1

This is not a question... rather an answer.

Problem

Browser is returning: "ERR_EMPTY_RESPONSE", "no data received", "the connection was reset", etc...

Apache error log is returning: "Segmentation fault"

sudo tail -f /var/log/apache2/error.log

[notice] child pid 10857 exit signal Segmentation fault (11)
[notice] child pid 10703 exit signal Segmentation fault (11)

Before running around the interwebs looking for answers in a forest of confusion and Godaddy bashing, check to see if the Suhosin Extension is installed by placing the phpinfo() function somewhere in one of your PHP scrips.

phpinfo(); die();

If you find that the Suhosin Extension is installed, you can remove it quite easily:

sudo apt-get remove php5-suhosin

Restart Apache:

sudo service apache2 restart

At this point, you should be good to go. Hope this helps at lest one person. I know I spent a good chunk of time hunting this down.

Cheers!

Gor
  • 505
  • 1
  • 6
  • 18
  • By the way, if anyone has concerns about the removal of Suhosin, go check out the project. It died a while ago... hardly maintained. Personally, and from a security standpoint, I have no interest in putting my trust into a project that isn't maintained within a year. Hence, why I have no problem in removing it. – Gor Sep 29 '13 at 01:34
  • IMHO Suhosin is just ONE of the possibile causes of a Segmentation fault. It can be a buggy module, an hardware fault (missing RAM o SWAP Space) or simply a temporary failure. I just "solved" a recurring segfault on Apache occurring when visiting a particular URL by simply restarting Apache itself. – Augusto Destrero Sep 16 '19 at 10:45

2 Answers2

2

I just fixed my connection reset problem by changing the theme. It seems an old and unsupported theme was causing the problem. After spending hours trying to figure out what was wrong with my server..and finding nothing in the logs :-\

Somehow, Wordpress should be able to handle this in a more intuitive way...

Svebor
  • 21
  • 2
1

I have spent over a year investigating a nearly identical issue. My Apache2 system hosts four virtual hosts. Two of them run WordPress. Occasionally, the server would return status 520 for the WordPress virtual hosts only (the non WordPress content would still serve) and the error log would fill with set faults. Restarting apache resolved the issue. Web searches turned up results like this thread, recommending extensions or plugins to disable, but none of them addressed my issue.

Finally, it occurred to me to write a simple shell script to restart apache when it fails to serve the WordPress content. A web searched turned up dozens of discussions in which frustrated apache sys admins had resorted to the same solution. Apparently, this is the fix, ugly as it is.

Here's the script I ended up using, in case it helps someone else.

#!/usr/bin/sh
/usr/bin/curl -f -s -A "apachecheck" -o /dev/null --head $1
if [ $? -ne 0 ] ; then
    /usr/bin/systemctl restart apache2
fi
Paul Martz
  • 166
  • 2
  • 4