In the last few days my Apache web server had a few stability problems. The symptom were httpd processes accumulating, eventually filling up all available slots inside the apache daemon.
Looking at the server-status, we find a large number of processes being stuck in s9y trackback processing POST requests like these:
CODE:
... 200.238.102.162 mysqldump.azundris.com
POST /comment.php?type=trackback&entry_id=7 HTTP/1.1
The IP shown is a .br IP trackbacking a very old (entry_id=7) article on mysqldump.azundris.com. A back-request against these types of IP numbers ends in either an open proxy or a firewalled and stuck connection.
This type of backchecking is precisely what the S9Y spamblock plugin does if you enable "Check Trackback URLs: Only allow trackbacks, when its URL contains a link to your blog". A workaround is to disable this backchecking.
But it is always better to fix things instead of working around bugs. So looking at the S9Y trackback processing code we find in plugins/serendipity_events_spamblock/ serendipity_events_spamblock.php the following:
CODE:
812 // Check Trackback URLs?
813 if ($addData['type'] == 'TRACKBACK' &&
serendipity_db_bool($this->get_config('trackback_check_url'))) {
814 require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
815
816 if (function_exists('serendipity_request_start'))
serendipity_request_start();
817 $req = &new HTTP_Request($addData['url'],
array('allowRedirects' => true,
'maxRedirects' => 5));
No readTimeout attribute is specified for HTTP_Request. Thus, this type of request can hang indefinitely and will occupy an apache process slot.
An attempt at fixing this:
CODE:
817 $req = &new HTTP_Request($addData['url'],
array('allowRedirects' => true,
'maxRedirects' => 5,
'readTimeout' => array(5, 0)));
We will see how this affects the performance.
Ich hatte mich vor einiger Zeit über ein seltsames Verhalten meines oder Kris' S9Y gewundert. Bis heute morgen blieb mir der Vorgang ein Rätsel. Jetzt hat Kris gefunden, woran es lag. Wobei er natürlich eigentlich ein anderes Problem gleicher Ursache l
Aufgenommen: Apr 10, 06:17