Subject | Blobs and IBO connection pool problems. |
---|---|
Author | mp527 |
Post date | 2004-02-19T16:10:06Z |
I have been dealing with Helen on this issue and I produced a test
program with the same code (exact) from my production server code
and it does not show the same behavior as from my server code.
First a little background, I use IBO in a TCP/IP server, as each
user connects a thread is spawned to handle the socket.
In the constructor of each users thread object I create the IBO
session, connection, transaction and a cursor object.
When the server starts it reads a INI file and one of the settings
is to use the IBO connection pool. When the use pool flag is set
instead of doing a disconnect I do a disconnecttopool. Performance
when using the pool is very good, but it causes the FB server
process to rise until all connections in the pool are cleared.
I don't keep each threads connection connected all the time, because
it would not be a good Idea to have 1000 connections to the DB at
the same time as 1000 connections to the socket server, so I only
connect and disconnect when commands are recieved that use the DB.
Like I said before I created a Form based app that uses the same
blob code (EXACT) and I can send blob after blob after blob and the
FB server process stays around 23mb even if I upload a 15mb file.
When I do the exact same thing from my servers client thread I can
get the FB servers process to rise to 100mb in just a few minutes of
uploading 10mb files.
The only difference is that my test app is operating in the context
of a VCL main app thread while my server code is operating in a
tthread object.
So my question is this, Does the IBO connection pool have issues
with being used from a thread? Is it relying on some VCL feature
that is not availabe in a tthread, i.e. like the windows message
queue?
I have the full source but I have not had time to dig deep into it
and see what the issue is.
So I hope maybe Jason has some ideas which may help.
Thanks
program with the same code (exact) from my production server code
and it does not show the same behavior as from my server code.
First a little background, I use IBO in a TCP/IP server, as each
user connects a thread is spawned to handle the socket.
In the constructor of each users thread object I create the IBO
session, connection, transaction and a cursor object.
When the server starts it reads a INI file and one of the settings
is to use the IBO connection pool. When the use pool flag is set
instead of doing a disconnect I do a disconnecttopool. Performance
when using the pool is very good, but it causes the FB server
process to rise until all connections in the pool are cleared.
I don't keep each threads connection connected all the time, because
it would not be a good Idea to have 1000 connections to the DB at
the same time as 1000 connections to the socket server, so I only
connect and disconnect when commands are recieved that use the DB.
Like I said before I created a Form based app that uses the same
blob code (EXACT) and I can send blob after blob after blob and the
FB server process stays around 23mb even if I upload a 15mb file.
When I do the exact same thing from my servers client thread I can
get the FB servers process to rise to 100mb in just a few minutes of
uploading 10mb files.
The only difference is that my test app is operating in the context
of a VCL main app thread while my server code is operating in a
tthread object.
So my question is this, Does the IBO connection pool have issues
with being used from a thread? Is it relying on some VCL feature
that is not availabe in a tthread, i.e. like the windows message
queue?
I have the full source but I have not had time to dig deep into it
and see what the issue is.
So I hope maybe Jason has some ideas which may help.
Thanks