Hi,
Am 28.07.2009 um 22:18 schrieb Mathieu Bruneau:
On Tue, Jul 28, 2009 at 12:03 PM, Alexander Malysh
<[email protected]> wrote:
just add store support to inmemory DLR and you are done...
but I'm --1 to keep DLRs in memory _and_ in storage. You choosed to
use external storage to keep
memory footprint low...
If you say: I will keep DLRs in memory while DB not available then
you should start thread to check DB availability
and add DLRs to DB. What will you do if kannel will told to shutdown
but some DLRs still in memory and DB not available?
I don't like the idea of dual storage either. That could be
interesting if you want to have some kind of cache in memory but in
case you want to preserve data you need to write it anyway... I
don't think the DLR would benefit much from this approach.
In fact, my issue is simply that MySQL drops connections too fast
for the usage Kannel gets (If I had a DLR to write every 5 sec I
wouldn't have spot this issue). The reconnect could happen on a
another server every 1h if it was not receiing much dlr.
Since the wait_timeout is there in all MySQL instance and cannot be
deactivated (It's just the value it's set at that change), maybe
having a timer send a mysql_ping to maintain the connection is
actually the valid fix... Basically it's adding an option to send
keepalive through the mysql connection for Kannel, effectively
turning this in a persistent connections, which would be valid since
Kannel use only a controlled number of connections.
This very much resemble the keep-alive on a SMPP connections (or any
other type of keep-alive) so I don't see what is really wrong with
this. I'm ready to hear other thought before I put my head into what
could be needed to add this :)
because to mantain keep-alive you need one thread to be running ->
wasting resources. This thread can be avoided (and already avoided) with
simple approach, check and reconnect connection only before connection
use.
The only issue you have, is max allowed connections in mysql and not
kannel itself.
Just make sure kannel always get connection to mysql and you will
never see issue there.
--
Math
aka ROunofF
[email protected]