Subject Re: [firebird-support] Detect connected clients?
Author Helen Borrie
At 12:13 AM 8/04/2008, you wrote:
>Hi,
>
>i see a strange situation on my client's database. DB last modified
>size shows 3 weeks ago and db size 180 MB. i stop the firebird service
>and db last modified time shows today and size grows 600 MB.
>
>Server : Firebird 1.5.4, windows 2003 Server English.

And you meant to say "Superserver", right? Superserver opens the database file when the first user logs in and then it stays open until next time all users are logged out. At that point, Windows will update the file details.

>How could i fix this situation?

What do you think is broken? Is 420 MB too much file growth for 3 weeks' worth of continually connected users?

>the reason is settings or some clients have some un-committed transactions?

You tell us. Uncommitted transactions, per se, do not take up disk space. However, long-running uncommitted read-write transactions will inhibit garbage collection and cause a build-up of allocated disk space that can't be re-used.

>How could i detect connected clients ip's?

You can't; but you don't need to, either. If web clients wander away, the TCP/IP connection will detect it eventually (usually after two hours) and then the server will know that the transactions are dead and will clean them up.

You *do* need to be aware of how your application code is managing transactions for the connections that stay alive. If the application has been written in such a way that transactions never get a hard commit, then you'll either need to fix that code or schedule in some daily time to shut down the database and run a sweep or a backup...

./heLen