Subject | Re: [firebird-support] Why is this setup not working? |
---|---|
Author | Alexey Kovyazin |
Post date | 2013-12-09T18:32:10Z |
You did not provide key characteristics of the server, database and transaction statistics, so please don't expect that you will have reasonable answer ("load of RAM and CPU" are not characteristics of the server. People have various opinions about "big' and "small").
You also did not provide firebird.conf, operation system settings, database size, typical queries and their lifecycle, etc.
According to our experience I can suppose that the answer for your question "Why is this setup not working?" is the following: probably database application design and/or transaction management have problems.
Can it be fixed? Sure - with more details.
Regards,
Alexey Kovyazin
www.IBSurgeon.com
Hey guys.
We have a webcluster consisting of 8 webservers running a PHP application with a firebird DB. The application have a rather hard peak one time a day and firebird are not able to give us the firebird connections quick enough. When the peak start we experience long responses and timeouts from the webservers due to the connection with the firebird DB. We expected the DB connections to be the problem so we then used persistent connections and told Apache2 to keep its threads for 2500 requests. This made a significant performance boost since we would have the connections ready when we hit the peak. At the peak we have 4000 request pr/m.
Now letting Apache2 handle the connection pooling is not a nice way of doing things. We have been looking for a connection pool for firebird but haven't been able to find any software that supports firebird(only one but it didn't support the use of stored procedures)? Does anyone know of any software that can make connection pooling with firebird?
The next thing is that even though we keep the connections open we still have timeouts due to the rotation of Apache2 processes. Everytime it rotates it needs to make a new persistent connection and this either give a long response time (20-30 sec) or more that resolves in a timeout from the webserver. The firebird database have ~640 connections when the pool have been build. If we restart our cluster and let Apache2 build up its connection pool we see some strange behavior. Everything is fine until the database hits ~400-~450 connections. Then the timeouts begin. Are we really pushing firebird to its limits? Prier we had issues with firebird as well that let us to shard the database into two instances(on separate hardware). Again this gave us a boost because the load was separated.
We have around 1.800.000 requests on one day. This leads to around 720 process rotations that the firebird db is not handling well. We are running firebird WI-V2.5.2.26539 Firebird 2.5. on two windows servers. The physical hardware is very potent. We have load of RAM and CPU and have a flash card installed. If we look at the resources on the physical server there is nothing to see. We do see more resources being used on the peak as is expected. But we are not near on depleting the resources of the hardware.
/Ronnie