Sporadic Internal Server Error with Google Analytics

Hi there! I'm running Virtualmin 3.80 pro on a Debian 5.0 system, PHP runs over fcgid. I noticed that on those sites with Google Analytics activated, from time to time it happens that an internal server error is thrown by apache. Here is what I found in the logs:

[Thu Oct 14 11:26:37 2010] [error] [client 66.249.66.88] Apache2::Filter::read: (103) Software caused connection abort at /usr/share/webmin/virtualmin-google-analytics/Virtualmin/GoogleAnalytics.pm line 76
[Thu Oct 14 11:26:37 2010] [warn] (500)Unknown error 500: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Oct 14 11:27:38 2010] [error] [client 66.249.66.88] Cannot copy to ARRAY in sassign at /usr/share/webmin/virtualmin-google-analytics/Virtualmin/GoogleAnalytics.pm line 78.\n
[Thu Oct 14 11:27:38 2010] [warn] (500)Unknown error 500: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Oct 14 11:28:15 2010] [error] [client 87.145.184.174] Cannot copy to ARRAY in sassign at /usr/share/webmin/virtualmin-google-analytics/Virtualmin/GoogleAnalytics.pm line 78.\n, referer: http://foo
[Thu Oct 14 11:28:15 2010] [warn] (500)Unknown error 500: mod_fcgid: ap_pass_brigade failed in handle_request function

Any ideas what the problem could be?

Status: 
Closed (fixed)

Comments

hmmm actually the ap_pass_brigade error seems to appear to other websites as well, so might be just a fcgi issue... that's my config

<IfModule mod_fcgid.c>
  AddHandler    fcgid-script .fcgi
  IPCConnectTimeout 60
  IPCCommTimeout 90
  IdleTimeout 43200
  IdleScanInterval 900
  ProcessLifeTime 43200
  MaxProcessCount 128
  MaxRequestsPerProcess 500
  DefaultMaxClassProcessCount 4
  DefaultMinClassProcessCount 1
</IfModule>

Are users actually seeing errors when accessing your site?

Some of those fcgi errors happen when a PHP process's connection is timed out, which is harmless..

actually, i looked at the logs cause it happened to me to see internal server errors while browsing two sites. reloading the page would work, but sometimes this happened. both sites were running google analytics and showed the error [Thu Oct 14 11:28:15 2010] [error] [client 87.145.184.174] Cannot copy to ARRAY in sassign at /usr/share/webmin/virtualmin-google-analytics/Virtualmin/GoogleAnalytics.pm line 78.\n, referer: http://foo in the logs. dunno if it has anything to do with the server error though...

Does the error in the logs happen at the same time as you saw errors in your browser?

Also, is there a particular page that always fails?

Yes exactly, it happened in the browser and i mmediately checked the logs, and saw this analytics error plus this fcgi error. Maybe it's just the analytics error that matters though, no idea...

So those two errors always happen at the same time?

Also, if you temporarily turn off analytics for this domain, do you still get the same errors?

sorry for not getting back, i forgot about it until it happened again even on the new server (i migrated recently). yes, the errors happen at the same time. i surf the site normally, then it happens that suddenly i get an "internal server error" message in the web browser. i then check the logs, and see errors like these

[Thu Oct 14 11:28:15 2010] [error] [client 87.145.184.174] Cannot copy to ARRAY in sassign at /usr/share/webmin/virtualmin-google-analytics/Virtualmin/GoogleAnalytics.pm line 78.\n, referer: http://foo
[Thu Oct 14 11:28:15 2010] [warn] (500)Unknown error 500: mod_fcgid: ap_pass_brigade failed in handle_request function

tied together. the error is not reproducable, it just happens sometimes, no matther which page on the domain. i turned off analytics and it seems ok for now...

What kinds of pages does it fail on? PHP, static HTML, images or something else?

It happens on PHP pages