Projects tigase _server server-core Issues #390
After 15 to 20 minutes of inactivity Message Archiving component raises an exception SqlException Invalid state, Connection is closed (#390)
Pradeep Mathan opened 1 decade ago
Due Date
2014-11-29

Message Archiving component gets invoked and data is persisted when this iq is used with .After 15 to 20 minutes of inactivity when a message is send , Message Archiving component raises an exception SqlException Invalid state, Connection is closed and the message is not persisted.Can you please advise us on how to proceed.

Andrzej Wójcik (Tigase) commented 1 decade ago

This exception is raised due to network connection being closed or broken due to inactivity. This can happen in 2 cases:

  • SQL Server closed connection due to inactivity

  • TCP connection was closed due to inactivity by router

As for SQL Server closing connection there might be some paramter in SQL configuration, but I'm not sure where to look for this parameter.

As for TCP connection being closed this mostly happens on routers if connection is NATed (ie. you are behind NAT)

Artur Hefczyc commented 1 decade ago

Andrzej, Wojciech:

We have (used to have and should still have) a code for database which reconnect to the DB in case DB connection is lost. It is quite normal and common that the connection to DB is lost for various reasons, hence the logic for reconnecting. If this is not working now (or maybe just for SQL Server) then this is a bug in our code which must be fixed.

However, I am pretty sure it should be there, since it is working for some existing customers.

Please check this out and ensure the DB reconnection logic still works after all recent DB changes.

Pradeep Mathan commented 1 decade ago

Tested it today, could not reproduce the issue, looks like it is fixed.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
2441
Spent time
3h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#390
Please wait...
Page is in error, reload to recover