midgardproject / midgard-php5

PHP5 API for Midgard persistent storage framework
http://www.midgard-project.org/api-docs/midgard/php/ratatoskr/
GNU Lesser General Public License v2.1
9 stars 2 forks source link

Intermittent server errors #28

Closed flack closed 13 years ago

flack commented 13 years ago

On a Debian 5 machine with latest midgard-php from git and midgard-core from ratatoskr-dev, I get server errors on approx. one of ten requests ATM. Sometimes, this means a white page, sometimes a server error 500, and often a half-rendered page where only a part of the HTML seems to have been sent by the server. The lighttpd error log only shows this:

(mod_fastcgi.c.2489) unexpected end-of-file (perhaps the fastcgi process died): pid: 20129 socket: unix:/tmp/php.socket-3 
(mod_fastcgi.c.3314) response already sent out, but backend returned error on socket: unix:/tmp/php.socket-3 for /rootfile.php , terminating connection 

The midgard debug log has has a lot of stuff, the last lines are:

midgard-core (pid:20151):(debug): midgard_collector::__construct(...)
midgard-core (pid:20151):(debug): midgard_collector::set_key_property(...)
midgard-core (pid:20151):(debug): midgard_collector::add_value_property(...)
midgard-core (pid:20151):(debug): midgard_collector::add_constraint(...)
midgard-core (pid:20151):(debug): midgard_collector::execute(...)
midgard-core (pid:20151):(debug):Model query = SELECT `style`.`guid` AS midgard_collector_key, `style`.`id` AS `id` FROM style WHERE `style`.`up` = 0 AND `style`.`name` = 'template_OpenPsa2' AND  style.metadata_deleted = 0
midgard-core (pid:20151):(debug): midgard_collector::list_keys(...)
midgard-core (pid:20151):(debug): midgard_collector::get_subkey(...)
midgard-core (pid:20151):(debug): midgard_style::new_collector(...)
midgard-core (pid:20151):(debug): midgard_collector::__construct(...)
midgard-core (pid:20151):(debug): midgard_collector::set_key_property(...)
midgard-core (pid:20151):(debug): midgard_collector::add_value_property(...)
midgard-core (pid:20151):(debug): midgard_collector::add_constraint(...)
midgard-core (pid:20151):(debug): midgard_collector::execute(...)
midgard-core (pid:20151):(debug):Model query = SELECT `style`.`guid` AS midgard_collector_key, `style`.`id` AS `id` FROM style WHERE `style`.`up` = 0 AND `style`.`name` = 'template_OpenPsa2' AND  style.metadata_deleted = 0
midgard-core (pid:20151):(debug): midgard_collector::list_keys(...)
midgard-core (pid:20151):(debug): midgard_collector::get_subkey(...)

I haven't really seen a pattern yet, it just seems to happen randomly on different pages in openpsa. If you reload the same page, the error usually disappears.

Interestingly, the openpsa (i.e. midcom) log looks exactly the same for aborted requests and successful ones. So it seems that the problem happens after midcom_application::finish() has run

flack commented 13 years ago

The problem disappeared after another package update, closing therefore