On 14/05/2008, at 9:32 PM, Mike Schrag wrote: As an aside, could anyone suggest why this error would occur? Is Entity Modeler (or more likely, I suppose, the JDBC layer) executing some of these generated SQL statements concurrently, and hence exceeding 30 connections?
No ... We do fire up EOF, and EOF leaves a connection open after starting things up -- I should try to forcefully close that when SQL gen is done. That you're getting THIRTY is really suspicious. I just did a test and I only get one, but you PROBABLY get one per classloader, which would mean at least one per project that SQL gen in, and if you change your classpath, you'd get an extra one. So I can totally believe they build up over time. You can check this by running:
"SELECT datname,procpid,current_query FROM pg_stat_activity ORDER BY procpid ;"
in psql and it will show a row per connection. Can you restart eclipse, run this before sql gen, sql gen, run again, and see what it shows? In 5.3 + latest PG plugin from Wonder, this is one connection.
I'm running WO 5.4, and my PostgresqlPlugIn dates from 20 Feb 2008, not sure what version it is.
After restarting Eclipse, I get this:
datname | procpid | current_query ---------+---------+------------------------------------------------------------------------------- AM3 | 11523 | SELECT datname,procpid,current_query FROM pg_stat_activity ORDER BY procpid ; (1 row)
After _generating_ the SQL for one model, I get this:
datname | procpid | current_query ---------+---------+------------------------------------------------------------------------------- AM3 | 11523 | SELECT datname,procpid,current_query FROM pg_stat_activity ORDER BY procpid ; AM3 | 11525 | <IDLE> in transaction
And then after executing that SQL I get this:
datname | procpid | current_query ---------+---------+------------------------------------------------------------------------------- AM3 | 11523 | SELECT datname,procpid,current_query FROM pg_stat_activity ORDER BY procpid ; AM3 | 11535 | <IDLE> AM3 | 11594 | <IDLE> AM3 | 11618 | <IDLE> AM3 | 11619 | <IDLE> AM3 | 11620 | <IDLE> AM3 | 11621 | <IDLE> AM3 | 11622 | <IDLE> AM3 | 11623 | <IDLE> AM3 | 11624 | <IDLE> AM3 | 11625 | <IDLE> AM3 | 11626 | <IDLE> AM3 | 11627 | <IDLE> AM3 | 11628 | <IDLE> AM3 | 11629 | <IDLE> AM3 | 11630 | <IDLE> AM3 | 11631 | <IDLE> AM3 | 11632 | <IDLE> AM3 | 11633 | <IDLE>
So if they represent open connections, they sure seem to be building up. I have four EO models in this particular project, so presumably hitting 30 connections eventually isn't inconceivable.
Should I upgrade the PostgresqlPlugIn, or is that irrelevant?
|