All client freeze on Servoy's server 3.5 after 1 hour

Hi,

I’ve recently upgrade my server to Servoy 3.5.

The server works fine during 1 hour but suddently all clients are freeze and I can’t restart another client on this server.

When the server is buging, I can’t connect a new client on localhost, I obtain this error: “Cannont save data” ans the solution freeze.
I can just access to web admin.

I have this message in log:

2007-08-23 14:03 	RMI TCP Connection(181)-192.168.0.2 	ERROR 	com.servoy.j2db.util.Debug 	null
java.util.NoSuchElementException: Timeout waiting for idle object
     at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:801)
     at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:110)
     at com.servoy.j2db.persistence.datasource.i.getConnection(Unknown Source)
     at com.servoy.j2db.persistence.Server.getConnection(Unknown Source)
     at com.servoy.j2db.dataprocessing.SQLEngine.a(Unknown Source)
     at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(Unknown Source)
     at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(Unknown Source)
     at sun.reflect.GeneratedMethodAccessor219.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
     at sun.rmi.transport.Transport$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.rmi.transport.Transport.serviceCall(Unknown Source)
     at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)

Thanks

Sounds like you’re running out of database connections.

Are you using any non-standard plugins maybe?

Are you extensively using database transactions, with a low connectionpool count and many client?

Paul

I use only normal plugin.

I have just a error with the file plugin on showFileOpenDialog() method:
http://forum.servoy.com/viewtopic.php?t=8996

I use transaction but seldom more than 2 in same time.

When this freese happens, can you log into the admin pages and look at teh Database Server page and check per server under Status if all connections are used?

Status
Server status: Online
Active connections: 10/10
Idle connections: 10/10

Paul

Oki I’ll try to show

The server is not crash but Active connections on my database is strange:

Status
Server status: Online
Active connections: 6/3
Idle connections: 3/10

:D You just found yourself a bug

It should have displayed “6/10” instead of “6/3”

This will be fixed in 3.5.1 and 4.0.

BTW: this was just a display issue, not related to the freezes you are experiencing.

Paul

Another BTW: when the freeze happens again, please also check the list of transactions on the Admin pages. Towards 1 database you can only have as much transactions as you have “Maximum Active Connections”, since each transaction uses 1 connection.

Paul

The server was freeze 3 times yesterday.
The list of transactions was empty.

The uptime of server this morning was 14hours because all clients was idling this night. So it’s well something from client.

For informations, my server work on Linux Mandriva Spring edition.

JDK Information
java.vm.name=Java HotSpot™ Client VM
java.vm.version=1.6.0_01-b06
java.vm.info=mixed mode, sharing
java.vm.vendor=Sun Microsystems Inc.

Operating System Information
os.name=Linux
os.version=2.6.17-13mdvlegacy
os.arch=i386

System Information
runtime.allocatedMemory=67892K
runtime.usedMemory=31697K

Hope this helps.

But what was displayed per database as status when the Server froze?

Due to the display issue of the status of active connections, per database, we’d also have to know the Maximum number of Active connections set per database.

First step in figuring out what is happening is determining if indeed all connections in the pool are used for one database when the freeze happens. Once we know that, we can start to have a look why this is happening.

Paul

when the server froze, status of my database :

Server status: Online
Active connections: 10/2
Idle connections: 2/10

I changed the maximum connections active and the maximum connections idle to 100 to test. The uptime is 2hours and it’s works at the moment.

Server status: Online
Active connections: 19/2
Idle connections: 2/100

I’ve 19 Active connections or only 5 clients are connect to database.

That is what I thought… somehow, connections are not being released. In theory, you should never have more active connections to a database as you have clients.

So, now the next step: Which plugins do you use? Any change you’re using (an old version of) the Jasper Reports plugin?

Paul

Plugin I use:

  • it2be_tools
  • kioskmode
  • textxport
  • excelxport
  • dialogs
  • file
  • busy

I’ll try to see if one of these plugins don’t release my connection

Mmm, those plugins ought to be fine…

When the freeze happens, you say about 5 clients are connected. How did you check this? Do you see only 5 clients connected on the Admin pages?

Paul

Hi Pierre-Andre,

What (version) backend database are you using? And what JDBC driver version do you use with this ?

yes, I check the client list from the webadmin.

My database is PostgreSQL 8.1.
My driver is org.postgresql.Driver (Default driver in servoy)

Hi Robert,

Have you sees such behavior before with Postgress?

Pierre: Could you create a case in our support system and attach your solution to it?

Paul

Pierre-Andre,

Can you download the latest PostgreSQL driver for your version (8.1 Build 410) from http://jdbc.postgresql.org/download.html .
Make sure you move the old driver out of the Drivers directory. You do need to reboot Servoy.

pbakker:
Have you sees such behavior before with Postgress?

I have had an issue with PostgreSQL 8.2.x and Servoy 3.1.4 where any insert/update to the database by Servoy would result in dropped database connections (although PostgreSQL would still have the connection open with a transaction going). In the admin pages it would show no transactions.
Upgrading to 3.1.6 solved that issue.

I think I find the problem

The connection is not release when I execute this method:

var query = “UPDATE animal SET statut = ‘’ WHERE idf_client=”+clientid+ " AND statut = ‘En sortie’"
var done = plugins.rawSQL.executeSQL(controller.getServerName(),“animal”,query)

This code work fine on Servoy 3.1.6 but not on Servoy 3.5