php - Zend / Apache2: Getting 302 Found when requesting url several times -


i programming rest api zend framework.
when calling url several times (e.g. 1000 times 1 request per second), in 0.2 % of cases instead of getting 200 ok response 302 found - redirect different page.
here entire server response:

302 found date: mon, 04 mar 2013 11:56:04 gmt server: apache/2.2.17 (ubuntu) x-powered-by: php/5.3.5-1ubuntu7.11 set-cookie: phpsessid=ui9r8jqa63dbom8osknso6eea5; path=/ expires: thu, 19 nov 1981 08:52:00 gmt cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 pragma: no-cache location: /de/default/index/index/error/500 vary: accept-encoding content-length: 0 content-type: text/html; charset=utf-8 

so zend redirects error 500 (internal server error) page. question why - , can't figure out...
php page called inserts one row mysql database , returns json string - that's all.

apache2 has 20 concurrent connections open , server load <<1 not understand why requests cause problems.

i know difficult problem remote diagnose, guesses , recommendations how solve more welcome! thanks.

this apache vhost config requested @chris:

<ifmodule mod_ssl.c> <virtualhost mydomain.tld:443>     serveradmin webmaster@localhost      documentroot /var/www     servername www.mydomain.tld     serveralias mydomain.tld *.mydomain.tld     <directory />         options followsymlinks         allowoverride     </directory>     <directory /var/www/>         options indexes followsymlinks multiviews         allowoverride         order allow,deny         allow     </directory>      scriptalias /cgi-bin/ /usr/lib/cgi-bin/     <directory "/usr/lib/cgi-bin">         allowoverride none         options +execcgi -multiviews +symlinksifownermatch         order allow,deny         allow     </directory>      errorlog /var/log/apache2/error.log      # possible values include: debug, info, notice, warn, error, crit,     # alert, emerg.     loglevel warn      customlog /var/log/apache2/ssl_access.log combined  #   rewritelog "/var/log/htaccess.log" #   rewriteloglevel 5      alias /doc/ "/usr/share/doc/"     <directory "/usr/share/doc/">         options indexes multiviews followsymlinks         allowoverride none         order deny,allow         deny         allow 127.0.0.0/255.0.0.0 ::1/128     </directory>      #   ssl engine switch:     #   enable/disable ssl virtual host.     sslengine on     ssloptions +strictrequire     sslcertificatefile /etc/apache2/ssl/cert_2013_2014.crt     sslcertificatekeyfile /etc/apache2/ssl/www.mydomain.tld.key     sslcacertificatefile /etc/apache2/ssl/intermediate.crt  </virtualhost> </ifmodule> 

this looks pretty simple , straight forward me. 302 redirect , can't think of in zf redirects itself; not 500 error page. 500 error (internal server error) must return 500 error , should never ever 302 redirect. sort of lucky here because you must have error handling in rets api causes redirect somewhere (instead of regular error page).

search code redirects. done zf redirector helper (inside controller) or manually (anywhere) header() , exit(). when found redirect either show (exit) debug_backtrace or dump log file. , fix return code or way error handled.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -