Community

About every 10 days Apache needs to be restarted

Avatar forum:novachek 3 months, 1 week ago

About every 10 days I'll go to visit my website and it will be down. I then log into Linode and on the dashboard see that Apache needs to be restarted, after which everything is fine. What's the best way to figure out why this is happening?

A couple of months ago there were specific error messages, but lately there's no indication as to what happened, at least not where I'm looking…

Also, I took some screenshots-- can I upload images on this forum? I see the Img button but I guess I don't understand how that works.

8 Replies

Here are the graphs and the plan details:

https://ibb.co/fuAxmc

https://ibb.co/hnuJsH

16:30 is about the time I restarted Apache.

Instead of screenshots, just grab relevant error messages, etc and wrap them in code blocks like this:

 code here 

You should start by taking look at Apache's error log during the time it goes offline - typically it's under /var/log/apache2/error.log on Debian/Ubuntu, and /var/log/httpd/error.log on CentOS, though it depends on how you have things configured - it should be spelled out in the vhost config.

Thanks. I noticed the site was down today around 2:30 pm (NY time). The apache error log shows this, which only seems to reference the Revive ad server and one particular artist page: (Even adjusting for time zone this seems to have happened much later than the site being down.)

[Tue Apr 10 23:21:43.361104 2018] [fcgid:warn] [pid 7968:tid 140333803357952] [client 66.249.69.143:57557] mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /home/prinstantly/public_html/public/revive/lib/OA/Dal/Delivery/mysql.php:53, referer: https://www.prinstantly.com/artist/kevin-wickersham
[Tue Apr 10 23:21:43.361174 2018] [fcgid:warn] [pid 7968:tid 140333803357952] [client 66.249.69.143:57557] mod_fcgid: stderr: Stack trace:, referer: https://www.prinstantly.com/artist/kevin-wickersham
[Tue Apr 10 23:21:43.361179 2018] [fcgid:warn] [pid 7968:tid 140333803357952] [client 66.249.69.143:57557] mod_fcgid: stderr: #0 /home/prinstantly/public_html/public/revive/lib/OA/Dal/Delivery/mysql.php(83): OA_Dal_Delivery_connect('database'), referer: https://www.prinstantly.com/artist/kevin-wickersham

[Tue Apr 10 23:21:43.361182 2018] [fcgid:warn] [pid 7968:tid 140333803357952] [client 66.249.69.143:57557] modfcgid: stderr: #1 /home/prinstantly/publichtml/public/revive/www/delivery/asyncspc.php(722): OADalDelivery_query('\n SELECT…'), referer: https://www.prinstantly.com/artist/kevin-wickersham

[Tue Apr 10 23:21:43.361186 2018] [fcgid:warn] [pid 7968:tid 140333803357952] [client 66.249.69.143:57557] modfcgid: stderr: #2 /home/prinstantly/publichtml/public/revive/www/delivery/asyncspc.php(2964): OADalDelivery_getZoneInfo(1), referer: https://www.prinstantly.com/artist/kevin-wickersham

[Tue Apr 10 23:21:43.361190 2018] [fcgid:warn] [pid 7968:tid 140333803357952] [client 66.249.69.143:57557] modfcgid: stderr: #3 /home/prinstantly/publichtml/public/revive/www/delivery/asyncspc.php(3807): MAX_cacheGetZoneInfo(1), referer: https://www.prinstantly.com/artist/kevin-wickersham

[Tue Apr 10 23:21:43.361193 2018] [fcgid:warn] [pid 7968:tid 140333803357952] [client 66.249.69.143:57557] modfcgid: stderr: #4 /home/prinstantly/publichtml/public/revive/www/delivery/asyncspc.php(3653): _adSelectZone(1, Array, '', true), referer: https://www.prinstantly.com/artist/kevin-wickersham

[Tue Apr 10 23:21:43.361197 2018] [fcgid:warn] [pid 7968:tid 140333803357952] [client 66.249.69.143:57557] modfcgid: stderr: #5 /home/prinstantly/publichtml/public/revive/www/delivery/asyncspc.php(4318): MAX_adSelect('zone:1', '', '', '', 0, 'UTF-8', Array, true, '', 'https://www.pri…', NULL), referer: https://www.prinstantly.com/artist/kevin-wickersham

[Tue Apr 10 23:21:43.361200 2018] [fcgid:warn] [pid 7968:tid 140333803357952] [client 66.249.69.143:57557] mod_fcgid: stderr: #6 {main}, referer: https://www.prinstantly.com/artist/kevin-wickersham

[Tue Apr 10 23:21:43.361204 2018] [fcgid:warn] [pid 7968:tid 140333803357952] [client 66.249.69.143:57557] modfcgid: stderr: thrown in /home/prinstantly/publichtml/public/revive/lib/OA/Dal/Delivery/mysql.php on line 53, referer: https://www.prinstantly.com/artist/kevin-wickersham

[Wed Apr 11 00:02:19.319197 2018] [fcgid:warn] [pid 7968:tid 140333769787136] [client 66.249.69.143:51376] modfcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function mysqlconnect() in /home/prinstantly/public_html/public/revive/lib/OA/Dal/Delivery/mysql.php:53, referer: https://www.prinstantly.com/

[Wed Apr 11 00:02:19.319271 2018] [fcgid:warn] [pid 7968:tid 140333769787136] [client 66.249.69.143:51376] mod_fcgid: stderr: Stack trace:, referer: https://www.prinstantly.com/

[Wed Apr 11 00:02:19.319275 2018] [fcgid:warn] [pid 7968:tid 140333769787136] [client 66.249.69.143:51376] modfcgid: stderr: #0 /home/prinstantly/publichtml/public/revive/lib/OA/Dal/Delivery/mysql.php(83): OADalDelivery_connect('database'), referer: https://www.prinstantly.com/

[Wed Apr 11 00:02:19.319277 2018] [fcgid:warn] [pid 7968:tid 140333769787136] [client 66.249.69.143:51376] modfcgid: stderr: #1 /home/prinstantly/publichtml/public/revive/www/delivery/asyncspc.php(722): OADalDelivery_query('\n SELECT…'), referer: https://www.prinstantly.com/

[Wed Apr 11 00:02:19.319292 2018] [fcgid:warn] [pid 7968:tid 140333769787136] [client 66.249.69.143:51376] modfcgid: stderr: #2 /home/prinstantly/publichtml/public/revive/www/delivery/asyncspc.php(2964): OADalDelivery_getZoneInfo(1), referer: https://www.prinstantly.com/

[Wed Apr 11 00:02:19.319295 2018] [fcgid:warn] [pid 7968:tid 140333769787136] [client 66.249.69.143:51376] modfcgid: stderr: #3 /home/prinstantly/publichtml/public/revive/www/delivery/asyncspc.php(3807): MAX_cacheGetZoneInfo(1), referer: https://www.prinstantly.com/

[Wed Apr 11 00:02:19.319297 2018] [fcgid:warn] [pid 7968:tid 140333769787136] [client 66.249.69.143:51376] modfcgid: stderr: #4 /home/prinstantly/publichtml/public/revive/www/delivery/asyncspc.php(3653): _adSelectZone(1, Array, '', true), referer: https://www.prinstantly.com/

[Wed Apr 11 00:02:19.319299 2018] [fcgid:warn] [pid 7968:tid 140333769787136] [client 66.249.69.143:51376] modfcgid: stderr: #5 /home/prinstantly/publichtml/public/revive/www/delivery/asyncspc.php(4318): MAX_adSelect('zone:1', '', '', '', 0, 'UTF-8', Array, true, '', 'https://www.pri…', NULL), referer: https://www.prinstantly.com/

[Wed Apr 11 00:02:19.319301 2018] [fcgid:warn] [pid 7968:tid 140333769787136] [client 66.249.69.143:51376] mod_fcgid: stderr: #6 {main}, referer: https://www.prinstantly.com/

[Wed Apr 11 00:02:19.319303 2018] [fcgid:warn] [pid 7968:tid 140333769787136] [client 66.249.69.143:51376] modfcgid: stderr: thrown in /home/prinstantly/publichtml/public/revive/lib/OA/Dal/Delivery/mysql.php on line 53, referer: https://www.prinstantly.com/

Apache stopped again. Pasting the last 2 lines of the error log in case this narrows anything down:

[Mon May 14 06:25:10.285290 2018] [mpm_event:notice] [pid 3633:tid 140094204712832] AH00493: SIGUSR1 received.  Doing graceful restart
[Mon May 14 06:25:11.132219 2018] [core:notice] [pid 3633] AH00060: seg fault or similar nasty error detected in the parent process

Any help appreciated.

(For some reason clicking on Apache Error Log in the left-hand column does not reveal the latest up-to-date log, even after refreshing. To see that, I have to go to System Logs then click View next to Apache error log.)

It happened again. Here's the last line of the error log:

[Sat Apr 21 22:53:38.611513 2018] [cgi:error] [pid 31585:tid 140551613519616] [client 117.14.153.59:62079] AH02811: script not found or unable to stat: /home/prinstantly/cgi-bin/user

I'll hire someone to look into those things. Thanks

None of this is indicating anything that would tell us what the problem is that's causing Apache to fail (beside you obviously missing the legacy PHP extension in your setup).

Please make sure that your Apache and PHP-FPM configuration is not set to allow the child processes to run infinitely. Memory leaks in PHP code that accumulate over time can and will cause Apache or FPM to fail.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct