Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I updated my database, but my application is still returning old GeoIP data. Do I have to restart my web server when I update the database?

0
Posted

I updated my database, but my application is still returning old GeoIP data. Do I have to restart my web server when I update the database?

0

The GEOIP_CHECK_CACHE flag in the C, Java and Perl APIs and the CheckCache flag in the mod_geoip module makes the API check for updated database for each GeoIP call. If the database has been updated, the API then reloads the filehandle and/or the memory cache. If you are using PHP in GEOIP_STANDARD mode, typically the GeoIP object is instantiated on each call, so there is no need to restart the web server. Using GEOIP_CHECK_CACHE does negatively impact performance (API benchmarks). For Apache applications that require high performance, an alternative is to send a USR1 signal to restart Apache, without interrupting the service when the database is updated. To send a USR1 signal, use: apachectl graceful or kill -USR1 `cat /usr/local/apache2/logs/httpd.

Related Questions

Thanksgiving questions

*Sadly, we had to bring back ads too. Hopefully more targeted.