tags:

views:

263

answers:

1

Hi,

I've wrote a PHP code, that downloads an excel file when the user clicks a button on the page. The code connects to db and use some stored functions which do some calculating multiple times so the execution time takes so long. I ran the code at localhost several times and everyting went well. But when I tried to run in my web server, ie gave "Due to current high demand, the page you are looking for cannot be delivered right now. HTTP Error 408 / 409 - Not acceptable / Resource conflict Internet Explorer " error and ff do nothing except tried to load the page but gave no error. I googled the error, didn't find any useful comments. someone mentioned about htaccess file and mod_security, but no I'm not using mod_security in apache's configuration.

Thanks in advance. Any help will be appreciated.

A: 

If MSIE gives you a 408, and Firefox does nothing, it may very well the execution time is terribly long, and MSIE just gives up whole FF is still waiting (untill you kill it, or Apache or PHP times out). AFAIK, Apache, PHP & user-agent all have their timeout settings. I wouldn't advice cracking those up as high as they might go, I'd say that if you run into a timeout on a webrequest, you should try very hard to optimise the work done (probably in the DB), and if it still takes to long, your other option is storing 'request', let a seperate job on the server (possibly cronjob) pick up those requests and generate the reports, store them, and inform the user (mail/text/messenger) their report is ready for download.

If there's another problem then a timeout, you apache error log of php error log (you do log errors I hope?) should tell you more.

Wrikken