-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance documentation to discuss database updates #74
Comments
Yeah, I agree it would be useful to say something about this in the docs. Reloading should be sufficient to see the new version. |
Parts of the DB are never reread from disk, even in case of swapping, etc. Otherwise, a running process could get some data about the new version while still having parts of the old one in memory. |
It shouldn't be the case that you have two conflicting versions of the database in use like you describe. How are you updating the database? The files get memory mapped, so you'll want to be sure that when you update them you do not rewrite the files (e.g. with cp) but instead replace them (e.g. with mv on the same filesystem). |
Making a note which I hope is picked up by search bots. If you have a process that updates all your servers from an internal mirror, something like:
If there are changes, the mmdb file is rewritten. On a very active server, almost immediately your logs will be overwhelmed with error messages like these:
Reloading the server will "fix" the problem, but the time between the update and the reload anything that relies on the environment variables is broken. I wonder if implementing the CheckCache, MemoryCache, and IndexCache options from mod_geoip2 would be worth the trouble. |
Even with those options, the database would be corrupt while it is being copied over. You would need to atomically replace the database file, e.g., with |
The documentation doesn't say if httpd must be stopped when updating the DB.
That should be added: no restart, restart, stop/start?
The text was updated successfully, but these errors were encountered: