Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
problem: beanstalk client with dynamic ip
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andre Ruiz  
View profile   Translate to Translated (View Original)
 More options Jul 7 2012, 2:56 am
From: Andre Ruiz <andre.r...@gmail.com>
Date: Fri, 6 Jul 2012 23:56:20 -0700 (PDT)
Local: Sat, Jul 7 2012 2:56 am
Subject: problem: beanstalk client with dynamic ip

Hi!

I'm using beanstalkd to queue some work to be processed remotely on my
company. The server is on the internet (public ip) but the consumers are
behind adsl lines remotely. So there is a linux as client going out through
a dynamic ip and connecting to the server to get a job. It's all PHP and
I'm using pheanstalk library on client.

Everything runs smoothly for some time, but then the adsl changes the IP
(every 24h hours the provider forces a reconnect) the client just hangs,
never to go out of "reserve".

I thought that putting a timeout on the reserve would help it, but it
didn't. As it seems, the client issues a command and blocks, it never
checks the timeout. Even with reserve-with-timeout (instead of a simple
reserve) it is the servers responsibility to return a TIME_OUT as the
timeout occurs. The problem is, the connection is broken and the client
will stay blocked reading, it will never return.
Is this a specific problem os pheastalk or is it inherent to the protocol?
How could I detect the stale connection and force a reconnect? (maybe some
kind of keepalive)

Thanks!
Andre


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andre Ruiz  
View profile  
 More options Jul 13 2012, 10:53 pm
From: Andre Ruiz <andre.r...@gmail.com>
Date: Fri, 13 Jul 2012 19:53:50 -0700 (PDT)
Local: Fri, Jul 13 2012 10:53 pm
Subject: Re: problem: beanstalk client with dynamic ip

I have temporarily solved this problem making a vpn between the client and
the server, so that the IPs of each end of the connection never change,
even if the dynamic ip changes and the vpn reconnect.

But I still would be interested in knowing if this is an expected behaviour
of the protocol.

Thanks,
Andre


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
赵绪  
View profile  
 More options Jul 26 2012, 11:23 pm
From: 赵绪 <zha...@maxthon.net>
Date: Fri, 27 Jul 2012 11:23:14 +0800
Local: Thurs, Jul 26 2012 11:23 pm
Subject: Re: problem: beanstalk client with dynamic ip

I want to sync data from mysql in IDC1 o mysql in IDC2. how to do ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zhu Han  
View profile  
 More options Jul 30 2012, 3:28 am
From: Zhu Han <schumi....@gmail.com>
Date: Mon, 30 Jul 2012 15:28:11 +0800
Local: Mon, Jul 30 2012 3:28 am
Subject: Re: problem: beanstalk client with dynamic ip

This is the expected behavior of TCP/IP. When no data is sent over the
wire, TCP can not detect the connection is broken after the IP is changed.

The only option is set SO_TIMEOUT on the connection to beanstalkd. Usually,
you can set it larger than the timeout value of reserve operation, so the
connection is not timed out prematurely.

best regards,
韩竹(Zhu Han)

坚果云 <https://jianguoyun.com/>, 最简捷易用的云存储
无限空间, 文件同步, 备份和分享!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andre Ruiz  
View profile  
 More options Jul 30 2012, 10:46 am
From: Andre Ruiz <andre.r...@gmail.com>
Date: Mon, 30 Jul 2012 11:46:14 -0300
Local: Mon, Jul 30 2012 10:46 am
Subject: Re: problem: beanstalk client with dynamic ip
Hi Zhu Han!

Thank you for answering.

I understand this is expected behaviour of tcp/ip, what I didn't know
is if this is intended behaviour of beanstalk clients. I could't find
any references on setting so_timeout on pheanstalk, I'll keep looking.
I guess the protocol or the clients should have a bultin protection
for that, it seems fragile for when client and server are distant over
the internet.

Thanks!
Andre

--
Andre Ruiz  <andre.r...@gmail.com>
Curitiba, PR, Brasil
Tel +55 (41) 8407-3847

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »