'Error in relation', and 'cannot save form data'

Attached is also the console error from a client machine

console error.txt (4.55 KB)

ok this is not network related, it is purely database related, somehow your connections are getting closed and i guess because of that the statements also

I just can’t explain that why this happens to you, you do have a validation query now in all your server definitions?
Because i see that when we want to perform a query when we ask for a prepared statement it already bombs out… That shouldnt happen if you have validation queries on that server…

Is there anything besides servoy itself that uses connections? so any 3th party plugins?

Hi Johan

I have query validation on. That was an earlier suggestion - it made no difference.
[EDIT… I THOUGHT I had query validation on, I have tried it before, but it made no difference so I set it back to exception validation. I will turn it back on now, also, it is/was only on for the one important database which is being used. There are a few others (repository, sample_data, user_data, etc.) Must I turn it on for ALL databases? I will turn it on now…]

Could this at all possibly be something that I am doing wrong in code?

Yes, I do have plugins, I have the IT2BE datastream plugin and the IT2BE_tools plugin. There was a suspicion that it2be datastream was causing my other error: (viewtopic.php?f=8&t=14786) which is to do with the number of connections being a weird number (-45/30) and requiring the server to be restarted every few days. Is this issue related to that one possibly?

The customer is annoyed with me that I cannot solve this problem (after a year). To date I have been blaming network problems (we recently replaced a network switch), however if it is either Servoy connections, or a plugin (datastream) connections, and it is not possible to be something I have coded wrong (can you confirm this?), then I will have to rebuild the parts of the solution which use the datastream plugin.

Thanks for any help.

Bevil

if you have query validation for all your servers then normal pure servoy code and servoy plugins shouldnt be able to cause this.
Or you database does really funny things… But that could be maybe because of some weird custom sql that you send to the database that causes it to close connections
(but this should be handled by the query validation)

So i still suspect some 3th party plugins, can’t you do some tests without them?

Hi Johan

Everything seemed to be going marvellously on Friday after I turned on query validation for all databases, then at the end of the day everyone was thrown out of Servoy, and we got lots of these: destroyObject: java.sql.SQLException: JZ0C0: Connection is already closed. In the log.

It has happened again today, and right now, in the databases section of Admin, I see this for the main database: Active connections: -9/30

I will try to build out the plugins and use other ones… I can’t leave them without the ability to stream data, so I can’t test without some plugin, and I can’t replicate the problem here, because it may take a day of several people using the solution before it has a problem.

AAAAAAAAArgh…

Bevil

do you have a full stacktrace of those?

Do you have any exceptions in the log before that? so is there a trigger exception?

Can you try to update to the latest sybase driver?
http://download.sybase.com/pub/jConnect … t-6_05.zip

Attached is the server ‘dump stacktrace’

The server log is here as I can’t attach it:
http://www.templeton-smith.com/servoylog131210.html

I don’t have a client stacktrace.

What is a trigger exception?

These errors are happening continuously it seems…

serverstackdump.txt (15.8 KB)

i just don’t understand this, all your those connections are just suddenly closed
the error destroyObject comes from it returning to the pool and then calling destroy, so it wont go back into the pool.

So why the next time you get another it still gets an connection again that is also closed even with your validation query, that is very weird.
I can’t explain this. You shouldn’t get invalid/closed connection from the pool, but as soon as we use a connection that we got from the pool we seem to get that isClosed exception.

We did upgrade parts of that code in 5.2, so maybe using 5.2 will also help you with this.

do you use database transaction in your code?
can it be that those are really long running somehow?

Is sybase constantly running correctly? doesn’t it get restarted?

Are you sure that you have configured it correctly to use Validation in the server definition?

Because if it isnt a long transaction, that just got stuck and a client really uses constantly that connection (which doesnt seem likely if you ask me)
then when a connection is got back from the pool i has to be validated and can’t be in a closed state.

No transactions

Sybase seems to be running okay, and no it doesn’t get restarted unless the server hardware is restarted for some reason, or if I want to manually back up the servoy folder

I think I have set them up to correctly use validation, attached is a screenshot of one of the servers in admin. This is how I was told to do it previously…

Wooooooooooohooooooooooooooooo

I think this problem is solved…

The solution was to remove the previous streaming plugin and replace it with the usermanager pro plugin. Since doing this, my two errors have not happened once (after many times per day for various clients previously).

Additionally, my issue with the number of connections being a strange number (-35/30 for eg) has also gone away.

My servoy-admin/log page looks eerily empty.

Big bonus.

Big Thank You for everyone that helped me with this. It has cost me an extraordinary amount in time, money and customer relations, but I think it is finally solved.

Bevil