LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "David Schwartz" <davids@webmaster.com>
To: <ncannasse@motion-twin.com>
Cc: <swivel@shells.gnugeneration.com>, <linux-kernel@vger.kernel.org>
Subject: RE: poll() blocked / packets not received ?
Date: Mon, 20 Oct 2008 16:21:11 -0700 [thread overview]
Message-ID: <MDEHLPKNGKAHNMBLJOLKMEMEAIAD.davids@webmaster.com> (raw)
In-Reply-To: <48FCBEBE.700@motion-twin.com>
> I agree with both points, but I can't modify the MySQL protocol to
> implement that.
> For (1) I can't add the timeout since I have no way to differentiate
> between a lost connection and a request that takes time to execute. I'll
> maybe check if the protocol allow pings while waiting for the request
> result, but I'm not sure it does.
Sure you can. For example, you can run a proxy on both the server and the
client, with the two proxies speaking a protocol that carries the MySQL
protocol. The protocol between the server and the client can include two
types of messages, one being regular data (which the proxies pass to the
server and client software) and one being a ping (which the proxies use
internally to decide when to drop their connections). Each proxy can 'ping'
the other as often as required and drop both connections if the ping fails
to go through. This will ensure that your program detects a connection loss
rapidly.
There are many other possible solutions.
> For (2) the shared resources is on the database side, not on the server
> side. It's the transaction that have some rows locked. I have no
> solution for that.
That doesn't fit your problem description. Presumably the server detected
the loss of the connection and so would have released any resources it was
holding that were associated with it. The problem in this case was that the
client couldn't detect the loss of the connection.
> Best,
> Nicolas
Good luck.
DS
next prev parent reply other threads:[~2008-10-20 23:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-20 8:25 Nicolas Cannasse
2008-10-20 10:15 ` swivel
2008-10-20 10:46 ` Nicolas Cannasse
2008-10-20 11:39 ` swivel
2008-10-20 12:13 ` Nicolas Cannasse
2008-10-20 12:39 ` Nicolas Cannasse
2008-10-20 15:53 ` David Schwartz
2008-10-20 17:24 ` Nicolas Cannasse
2008-10-20 23:21 ` David Schwartz [this message]
2008-10-21 5:12 ` Willy Tarreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MDEHLPKNGKAHNMBLJOLKMEMEAIAD.davids@webmaster.com \
--to=davids@webmaster.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncannasse@motion-twin.com \
--cc=swivel@shells.gnugeneration.com \
--subject='RE: poll() blocked / packets not received ?' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).