pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedWeb server to Database Taking forever
5+ messages / 4 participants
[nested] [flat]
* Web server to Database Taking forever
@ 2004-09-30 14:46 Scott Dunn <sdunn@tsh.net>
0 siblings, 1 reply; 5+ messages in thread
From: Scott Dunn @ 2004-09-30 14:46 UTC (permalink / raw)
To: pgsql-performance
Sometimes when you click on a link on my site to access my postgres database
it takes forever for it to connect. You can click this link and see how long
it takes.
<http://www.3idiots.com:8080/examples/jsp/movies/wantedlist.jsp;
http://www.3idiots.com:8080/example.../wantedlist.jsp
It doesn't do it all the time. Sometimes its really fast. I can't figure out
what is wrong. If I go on the server where the database is I can connect and
run queries with no problem. I can also access the database from Access and
run queries with no problems. It is only a problem when you come from the
web. Tomcat and apache are both working. You can see this by going here
<http://www.3idiots.com:8080/examples/jsp/movies/moviesearch.jsp;
http://www.3idiots.com:8080/example...moviesearch.jsp
I am using
psql (PostgreSQL) 7.2.1
tomcat 4.0.1
apache-1.3.9-4
Redhat linux 6.2
Does anyone know what I can check to see what is causing this. It seemed to
have happened all of sudden one day. I don't know what could have changed to
cause this. I have rebooted the server and it still happens. Any help will
be greatly appreciated.
Also I need to add that I never get an error message. It just sits there for
quite some time. Eventually it will work.
Scott
Scott Dunn
The Software House, Inc.
513.563.7780
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Web server to Database Taking forever
@ 2004-09-30 16:39 Josh Berkus <josh@agliodbs.com>
parent: Scott Dunn <sdunn@tsh.net>
0 siblings, 1 reply; 5+ messages in thread
From: Josh Berkus @ 2004-09-30 16:39 UTC (permalink / raw)
To: Scott Dunn <sdunn@tsh.net>; +Cc: pgsql-performance
Scott,
> Sometimes when you click on a link on my site to access my postgres
> database it takes forever for it to connect. You can click this link and
> see how long it takes.
> <http://www.3idiots.com:8080/examples/jsp/movies/wantedlist.jsp;
> http://www.3idiots.com:8080/example.../wantedlist.jsp
Sounds like it's a problem with your Tomcat and/or JDBC setup. Try the
pgsql-jdbc mailing list for help.
--
Josh Berkus
Aglio Database Solutions
San Francisco
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Web server to Database Taking forever
@ 2004-09-30 18:58 Scott Dunn <sdunn@tsh.net>
parent: Josh Berkus <josh@agliodbs.com>
0 siblings, 2 replies; 5+ messages in thread
From: Scott Dunn @ 2004-09-30 18:58 UTC (permalink / raw)
To: 'Josh Berkus' <josh@agliodbs.com>; +Cc: pgsql-performance
It is all working now. The thing is I didn't change anything. So do you
still think its Tomcat or the jdbc driver?
-----Original Message-----
From: pgsql-performance-owner@postgresql.org
[mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Josh Berkus
Sent: Thursday, September 30, 2004 12:39 PM
To: Scott Dunn
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Web server to Database Taking forever
Scott,
> Sometimes when you click on a link on my site to access my postgres
> database it takes forever for it to connect. You can click this link
> and see how long it takes.
> <http://www.3idiots.com:8080/examples/jsp/movies/wantedlist.jsp;
> http://www.3idiots.com:8080/example.../wantedlist.jsp
Sounds like it's a problem with your Tomcat and/or JDBC setup. Try the
pgsql-jdbc mailing list for help.
--
Josh Berkus
Aglio Database Solutions
San Francisco
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Web server to Database Taking forever
@ 2004-09-30 19:17 Edwin Eyan Moragas <haaktu@gmail.com>
parent: Scott Dunn <sdunn@tsh.net>
1 sibling, 0 replies; 5+ messages in thread
From: Edwin Eyan Moragas @ 2004-09-30 19:17 UTC (permalink / raw)
To: Scott Dunn <sdunn@tsh.net>; +Cc: Josh Berkus <josh@agliodbs.com>; pgsql-performance
On Thu, 30 Sep 2004 14:58:27 -0400, Scott Dunn <sdunn@tsh.net> wrote:
> It is all working now. The thing is I didn't change anything. So do you
> still think its Tomcat or the jdbc driver?
>
a suspect might be the nature of JSP. on the first hit,
JSP is converted to a Servlet, the compiled and loaded
by Tomcat. consequent hits would be fast. first one is always
slow.
how did you connect to the database?
--
stp,
eyan
inhale... inhale... hold... expectorate!
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Web server to Database Taking forever
@ 2004-09-30 20:19 Scott Marlowe <smarlowe@qwest.net>
parent: Scott Dunn <sdunn@tsh.net>
1 sibling, 0 replies; 5+ messages in thread
From: Scott Marlowe @ 2004-09-30 20:19 UTC (permalink / raw)
To: Scott Dunn <sdunn@tsh.net>; +Cc: 'Josh Berkus' <josh@agliodbs.com>; pgsql-performance
On Thu, 2004-09-30 at 12:58, Scott Dunn wrote:
> It is all working now. The thing is I didn't change anything. So do you
> still think its Tomcat or the jdbc driver?
Are getting an unnaturally large number of processes or threads or
pooled connections or what-not somewhere maybe? Have you tried logging
output from something like top or iostat to see what's going crazy when
this happens? Just wondering.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2004-09-30 20:19 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-09-30 14:46 Web server to Database Taking forever Scott Dunn <sdunn@tsh.net>
2004-09-30 16:39 ` Josh Berkus <josh@agliodbs.com>
2004-09-30 18:58 ` Scott Dunn <sdunn@tsh.net>
2004-09-30 19:17 ` Edwin Eyan Moragas <haaktu@gmail.com>
2004-09-30 20:19 ` Scott Marlowe <smarlowe@qwest.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox