LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-09-2003, 06:26 PM   #1
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Timeout after 30s (apache+php+postgreSQL)


The execution of my php script doing database queries is interrupted by a "Error: timeout on server" message or something like that after 30s, though I already made the following changes to avoid such timeouts:

1. inserted 'set_time_limit(360)' at the beginning of the script,
2. set 'max_execution_time=300' and 'max_input_time=600' in php.ini,
3. set 'Timeout 300' in httpd.conf, and restarted apache (apachectl restart)

Is there something I missed? Why my requests keep timing out?

Last edited by J_Szucs; 10-09-2003 at 07:13 PM.
 
Old 10-09-2003, 06:55 PM   #2
Mirrorball
Member
 
Registered: May 2003
Location: Brazil
Distribution: Gentoo
Posts: 81

Rep: Reputation: 15
Wasn't the timeout on the PostgreSQL server?
 
Old 10-09-2003, 07:23 PM   #3
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Original Poster
Rep: Reputation: 58
Quote:
Wasn't the timeout on the PostgreSQL server?
I do not think so, since I could not find any timeout settings in postgresql.conf.
Besides, if there were any limitation on the runtime of a query or PostgreSQL connection, I do not think it would be as short as 30s (I think an SQL query is reasonably allowed to run for several minutes by default).

Last edited by J_Szucs; 10-09-2003 at 07:24 PM.
 
Old 10-10-2003, 03:26 AM   #4
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Original Poster
Rep: Reputation: 58
Wow!

I tried it from within the LAN, and there is no 30s timeout!

So the timeout I experienced from home was either due to the fact that I connected to the server from the outside of our LAN, or maybe my efforts to sighup apache took effect after some hours of delay.

When I connect to the server from the outside I do it through a natd port forward on the firewall, and a stunnel between the http and https ports. I already checked stunnel, there is no 30s timeout (only a 300s one). A 30s timeout in natd seems unlikely, too.

So I am still puzzled...

Last edited by J_Szucs; 10-10-2003 at 05:16 AM.
 
Old 10-10-2003, 01:30 PM   #5
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Original Poster
Rep: Reputation: 58
The timeout is still there from the outside.

So:
ipfw + natd +stunnel + apache + php + postgresql = 30s timeout
stunnel + apache + php + postgresql = no 30s timeout

It seems that it has something to do with the firewall or natd.
 
Old 06-07-2015, 11:01 PM   #6
ronelvcabrera
LQ Newbie
 
Registered: Jun 2015
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by J_Szucs View Post
The timeout is still there from the outside.

So:
ipfw + natd +stunnel + apache + php + postgresql = 30s timeout
stunnel + apache + php + postgresql = no 30s timeout

It seems that it has something to do with the firewall or natd.

How did you resolve this? I might be encountering the same issue.
 
Old 06-07-2015, 11:06 PM   #7
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,366
Blog Entries: 24

Rep: Reputation: 4295Reputation: 4295Reputation: 4295Reputation: 4295Reputation: 4295Reputation: 4295Reputation: 4295Reputation: 4295Reputation: 4295Reputation: 4295Reputation: 4295
You have replied to a 12 year old thread!

You would do much better to open your own thread and provide the information relevant to your own system.

And welcome to LQ!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache,PHP and PostgreSQL in a package Boby Linux - Software 1 03-29-2005 06:21 PM
Apache+Postgresql+PHP. reconfigure? vickr1z Linux - Newbie 2 08-23-2004 02:58 AM
Apache-php-postgresql-phppgadmin koswo Linux - Software 0 02-05-2004 06:05 AM
PHP + PostgreSQL + Apache - What slows down my browser? J_Szucs Programming 4 09-08-2003 05:33 PM
how to link apache+php+postgresql Sridhar Guntur Linux - General 3 01-09-2003 01:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration