Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2017-11-08, 01:15:42

Author Topic: error 500 internal server error after 30 sec  (Read 4523 times)

0 Members and 1 Guest are viewing this topic.

Offline Xopop

  • Junior Member
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
error 500 internal server error after 30 sec
« on: 2014-01-17, 08:52:00 »
Hi

I have a problem I can not solve it, so if you can help me I would be very grateful.

I have a php script that reads sleep

`<?php
echo date('h:i:s') . "RADI NE RADI?<br>";

//sleep for 180 seconds
sleep(180);

//start again
echo date('h:i:s');
?>`

She is testing php execution time, but does not apply the rule that I gave in php settings than me timeout after 30 seconds.

Server is nginx-proxy php 5.4.23. php Type php is php-fpm I changed the time in PHP. Changed during the execution of the php-fpm but I still throws error 500 in the browser.

Thank you for your response

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: error 500 internal server error after 30 sec
« Reply #1 on: 2014-01-17, 09:12:55 »
What's about if change 180 to lower value (let say 30)?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Xopop

  • Junior Member
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: error 500 internal server error after 30 sec
« Reply #2 on: 2014-01-17, 09:25:22 »
for a time of 30 seconds, returns the same 500

for a period of 20 seconds gives the execution of PHP scripts ...

I do not know what the problem really because the execution time of PHP was increased to 180 seconds and throws an error after exactly 30 seconds.


Final time:
Limit the time for execution is 29 seconds ...
« Last Edit: 2014-01-17, 09:41:35 by Xopop »

Offline Xopop

  • Junior Member
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: error 500 internal server error after 30 sec
« Reply #3 on: 2014-01-17, 09:29:04 »
I read that the problem may be with FastCGI. Is it possible that there are some settings for FastCGI to increase the timeout?

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: error 500 internal server error after 30 sec
« Reply #4 on: 2014-01-17, 09:52:51 »
It's typically proxy and or php-fpm. They are need timeout.

You must modified timeout value if need more then default value.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Xopop

  • Junior Member
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: error 500 internal server error after 30 sec
« Reply #5 on: 2014-01-17, 09:58:09 »
where the proxy change timeout?

for php-fpm /etc/php-fpm.d but proxy do not know.

Thanks in advance
« Last Edit: 2014-01-17, 10:09:06 by Xopop »

Offline Xopop

  • Junior Member
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: error 500 internal server error after 30 sec
« Reply #6 on: 2014-01-17, 10:43:26 »
for proxy I found the settings (vi /home/nginx/conf/globals/proxy.conf)

  proxy_connect_timeout 180s;
     proxy_send_timeout 180s;
     proxy_read_timeout 180s;
     # proxy_buffers 32 4k;
     proxy_buffers 8 128k;
     proxy_buffer_size 128k;

but nowhere can I find timeout 30 seconds.

It's really a problem when you have a PHP script execution for more than 29 (30) seconds

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: error 500 internal server error after 30 sec
« Reply #7 on: 2014-01-17, 10:47:09 »
Try also find out for php-fpm config and apache config for fastcgi.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Xopop

  • Junior Member
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: error 500 internal server error after 30 sec
« Reply #8 on: 2014-01-17, 11:40:01 »
FastCGI has the following configuration

 FcgidIOTimeout 40
        FcgidConnectTimeout 10
        FcgidMaxProcesses 8
        FcgidOutputBufferSize 64
        ProcessLifeTime 240
        FcgidMaxRequestsPerProcess 500
        FcgidMinProcessesPerClass 0
        FcgidMaxRequestLen 15728640

I've changed

 FcgidIOTimeout 400
 FcgidConnectTimeout 100

and nothing changes

whether there may be a strict path where I could look? Or whether there is a configuration server where a PHP script will be able to have the execution to the end and not a limited time?

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: error 500 internal server error after 30 sec
« Reply #9 on: 2014-01-17, 12:23:31 »
Change to something like 'FastCGIExternalServer "/home/kloxo/httpd/webmail/webmail.dev.potissima.com.0fake" -socket /home/php-fpm/sock/apache.sock -idle-timeout 180'
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Xopop

  • Junior Member
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: error 500 internal server error after 30 sec
« Reply #10 on: 2014-01-17, 12:39:34 »
Change to something like 'FastCGIExternalServer "/home/kloxo/httpd/webmail/webmail.dev.potissima.com.0fake" -socket /home/php-fpm/sock/apache.sock -idle-timeout 180'


This is where the?

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: error 500 internal server error after 30 sec
« Reply #11 on: 2014-01-17, 23:42:38 »
Inside /home/apache/tpl/defaults.conf.tpl and domains.conf.tpl and copy to custom.defaults.conf.tpl and custom.domains.conf.tpl and then run 'sh /script/fixweb; sh /script/restart-web'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline shoque

  • Junior Member
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: error 500 internal server error after 30 sec
« Reply #12 on: 2014-03-05, 02:53:56 »
FastCGI has the following configuration

 FcgidIOTimeout 40
        FcgidConnectTimeout 10
        FcgidMaxProcesses 8
        FcgidOutputBufferSize 64
        ProcessLifeTime 240
        FcgidMaxRequestsPerProcess 500
        FcgidMinProcessesPerClass 0
        FcgidMaxRequestLen 15728640



where is this fastcgi file located, can anyone please tell me. I have to increase fcgid max proccess.

thanks

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: error 500 internal server error after 30 sec
« Reply #13 on: 2014-03-05, 03:01:29 »
In /etc/httpd/conf.d/fastcgi.ini
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.04 seconds with 17 queries.

web stats analysis
 
Mirror created by MasterkinG32.CoM