Keith Rarick | 1 Mar 03:30 2010
Picon

Re: Make'd, Installed, how can I get this running on boot?

On Fri, Feb 26, 2010 at 12:23 PM, Serafeim Zanikolas
<serzan@...> wrote:
> On Fri, Feb 26, 2010 at 10:09:04AM -0800, Mike Curry wrote [edited]:
>> I want to configure beanstalk to start on boot.
> [..]
>> I am using Ubuntu/Jaunty.
>
> Since you're using a debian-derivative distro, I suggest that you install the
> beanstalkd package from debian testing:

Also, Dustin just recently wrote a good introduction to modern process
management.

http://dustin.github.com/2010/02/28/running-processes.html

On Ubuntu, you probably want to use upstart. Writing an upstart script
for beanstalkd should be easy. Just put it in
/etc/init/beanstalkd.conf and upstart should take care of things.
Here's a starting point. I haven't tested it.

    description	"Beanstalk is a simple, fast work queue."
    author		"Keith Rarick <kr@...>"

    start on runlevel [23]
    stop on runlevel [01456]

    exec /usr/local/bin/beanstalkd -u daemon
    respawn

If you use the debian package, you'll need to adjust the path and
(Continue reading)

Keith Rarick | 1 Mar 03:37 2010
Picon

Re: infinite queue

Yeah, it sounds like you are making a state machine that loops through
a fixed number of states, one for each task in the list. If you store
the current state somewhere, you can have one worker process that just
does the right thing and then updates the state. You could schedule
that by cron, or just have a long-running process that loops forever.

kr

On Wed, Feb 24, 2010 at 9:37 AM, Tim Gunter <icyliquid@...> wrote:
> Sounds like something better suited to more persistent storage, such as a DB
> table. You could even cache the table if load is an issue, and trash/remake
> the cache entry whenever you modify the task list.
>
> On Wed, Feb 24, 2010 at 11:19 AM, Martin Sarsale
> <martin@...> wrote:
>>
>> Guys:
>>
>> We're using beanstalkd to maintain a list of tasks that need to be
>> executed in order "forever".
>>
>> We're currently:
>> 1) reserving the job
>> 2) processing it
>> 3) deleting it from the queue
>> 4) adding it again, at the end
>>
>> Can you think a better way to do this? Maybe we're forcing beanstalkd
>> to do something it's not designed for?
>>
(Continue reading)

Keith Rarick | 1 Mar 03:46 2010
Picon

Re: lock file ownership?

I think you are right, it should ideally be done after switching the
user. In practice, I think few people will actually encounter the
problematic situation.

Unfortunately, fixing it now would cause this problem, once, for
almost everyone.

Any ideas about how to do the transition smoothly?

kr

On Sun, Feb 21, 2010 at 11:16 PM, Jeremy Hinegardner
<jeremy@...> wrote:
> Hi,
>
> Just had a thought, shouldn't the binlog lock file be opened and locked
> AFTER the user is switched?
>
> If beanstalk is started with an init script, and using the -u option to
> su to another user, then it is started as root, and the lockfile for
> the binlog is owned by root with 0600 permissions.
>
> This means that for a beanstalkd server started once as root with the
> -u option to su to a user and then shutdown.  The only way to have
> a beanstalkd server started again with that particular binlog is to
> start it as root, or manually make change/erase the lock file so that
> some other user may start the service.
>
> is this an issue?
>
(Continue reading)

Keith Rarick | 1 Mar 03:52 2010
Picon

Re: Memory leak; new version soon?

On Wed, Feb 3, 2010 at 9:29 AM, Adam Lowry <adam@...> wrote:
> One of our servers has been bit by issue #29 [1], the memory leak in do_stats. I see that you mentioned
cutting a new version soon in the comments. Do you have an ETA for that? If not, that's ok -- I've verified the
fix on my end and I can rebuild it with the patch for our production system.

Yes, I am catching up on beanstalkd stuff right now. ETA is today or tomorrow.

kr

--

-- 
You received this message because you are subscribed to the Google Groups "beanstalk-talk" group.
To post to this group, send email to beanstalk-talk@...
To unsubscribe from this group, send email to beanstalk-talk+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/beanstalk-talk?hl=en.

Keith Rarick | 1 Mar 04:10 2010
Picon

windows compatibility

Greg Hazel has started working on making beanstalkd compatible with Windows.

http://github.com/ghazel/beanstalkd/commit/086fafaf18845f6066be2565f62c63e7207cf31e

This is a worthwhile goal, and I am grateful for this work, but I'm
worried I won't be able to maintain compatibility in the future, since
I have no windows machines to test on and we don't have buildbots or
anything like that to tell me when I've broken the windows build.
(It's hard enough maintaining Mac OS, FreeBSD, and Solaris
compatibility. I usually only check on those platforms right before a
release, and I often miss things.) So that makes me reluctant to
accept these patches.

Any opinions or suggestions on this? Are there good tools (online or
otherwise) I should know about that would automate some of this? Any
volunteers to test commits soon after they are pushed and tell me when
I've made a mess in windows-land (and, ideally, to clean up those
windows-messes)?

Actually, these questions go for all OSes. I welcome anything to make
maintaining cross-platform compatibility easier and more reliable.

kr

--

-- 
You received this message because you are subscribed to the Google Groups "beanstalk-talk" group.
To post to this group, send email to beanstalk-talk@...
To unsubscribe from this group, send email to beanstalk-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/beanstalk-talk?hl=en.

(Continue reading)

Keith Rarick | 1 Mar 04:41 2010
Picon

Re: Configure?

On Thu, Feb 18, 2010 at 3:30 PM, Serafeim Zanikolas <serzan@...> wrote:
> On Wed, Feb 17, 2010 at 01:36:34PM -0800, Jon Handler wrote [edited]:
>> when running make check, it looks like there's a failure (although it
>> seems to be working fine when I actually run it.
>
> That's a false positive -- the .expected file for pause-tubes isn't correct.
> (I actually mentioned this on list 5 days ago)

The test is correct. The failure is a bug in the test framework. See
http://github.com/kr/beanstalkd/issues/issue/26 . I've finally merged
in the patch to fix that problem.

kr

--

-- 
You received this message because you are subscribed to the Google Groups "beanstalk-talk" group.
To post to this group, send email to beanstalk-talk@...
To unsubscribe from this group, send email to beanstalk-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/beanstalk-talk?hl=en.

Keith Rarick | 1 Mar 04:48 2010
Picon

Re: patch to improve test scripts for unsupervised builds

On Sun, Feb 14, 2010 at 1:25 PM, Serafeim Zanikolas <serzan@...> wrote:
> I'm sending a patch to improve the test shell scripts as follows:

Thank you so much. I apologize for taking so long to get to this.

These are all great changes and I want to merge them. I especially
appreciate the refactoring you did of shell functions.

Do you mind breaking this up into separate patches? (Ideally in git
format-patch format, but that's not a big deal.)

> Please also consider either fixing or dropping the pause-tubes test (currently
> failing due to an obsolete .expected file)

This was a bug in the test framework. It's fixed now. But note that we
now require python to run the tests.

kr

--

-- 
You received this message because you are subscribed to the Google Groups "beanstalk-talk" group.
To post to this group, send email to beanstalk-talk@...
To unsubscribe from this group, send email to beanstalk-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/beanstalk-talk?hl=en.

Keith Rarick | 1 Mar 06:08 2010
Picon

Re: memory leak in list-tubes-watched with beanstalkd 1.4.3

I applied and pushed this patch. It'll be in the upcoming release.

rk

On Mon, Dec 28, 2009 at 6:04 AM, sebest
<sebastien.estienne@...> wrote:
> in prot.c
>
> --- prot.c~     2009-11-29 01:55:35.000000000 +0100
> +++ prot.c      2009-12-28 15:00:22.308353126 +0100
>  <at>  <at>  -1001,6 +1001,9  <at>  <at> 
>     c->out_job = allocate_job(resp_z); /* fake job to hold response
> data */
>     if (!c->out_job) return reply_serr(c, MSG_OUT_OF_MEMORY);
>
> +    /* Mark this job as a copy so it can be appropriately freed later
> on */
> +    c->out_job->state = JOB_STATE_COPY;
> +
>     /* now actually format the response */
>     buf = c->out_job->body;
>     buf += snprintf(buf, 5, "---\n");
>
> --
>
> You received this message because you are subscribed to the Google Groups "beanstalk-talk" group.
> To post to this group, send email to beanstalk-talk@...
> To unsubscribe from this group, send email to beanstalk-talk+unsubscribe <at> googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beanstalk-talk?hl=en.
>
(Continue reading)

Serafeim Zanikolas | 1 Mar 20:05 2010
Picon

[PATCH 2/3] cleanup temporary fiu fifos

---
 sh-tests/binlog-diskfull-delete.sh |    2 +-
 sh-tests/binlog-diskfull.sh        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sh-tests/binlog-diskfull-delete.sh b/sh-tests/binlog-diskfull-delete.sh
index 598b14f..10e3607 100755
--- a/sh-tests/binlog-diskfull-delete.sh
+++ b/sh-tests/binlog-diskfull-delete.sh
 <at>  <at>  -35,7 +35,7  <at>  <at>  killbeanstalkd() {

 cleanup() {
     killbeanstalkd
-    rm -rf "$logdir" "$out1" "$out2"
+    rm -rf "$logdir" "$out1" "$out2" ${tmpdir}/fiu-ctrl-[0-9]*.{in,out}
 }

 catch() {
diff --git a/sh-tests/binlog-diskfull.sh b/sh-tests/binlog-diskfull.sh
index 9157795..3bfef36 100755
--- a/sh-tests/binlog-diskfull.sh
+++ b/sh-tests/binlog-diskfull.sh
 <at>  <at>  -28,7 +28,7  <at>  <at>  killbeanstalkd() {

 cleanup() {
     killbeanstalkd
-    rm -rf "$logdir" "$out1" "$out2"
+    rm -rf "$logdir" "$out1" "$out2" ${tmpdir}/fiu-ctrl-[0-9]*.{in,out}
 }

(Continue reading)

Serafeim Zanikolas | 1 Mar 20:05 2010
Picon

[PATCH 1/3] run tests only if loopback interface is configured

---
 check.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/check.sh b/check.sh
index ff3821f..01c3e57 100755
--- a/check.sh
+++ b/check.sh
 <at>  <at>  -1,5 +1,12  <at>  <at> 
 #!/bin/bash

+if /sbin/ifconfig | egrep -q '^lo[[:space:]]+Link'; then
+    echo "loopback interface is configured, getting on with tests"
+else
+    echo "loopback interface is NOT configured, won't run tests"
+    exit 0
+fi
+
 one="$(dirname "$0")/check-one.sh"

 for commands in "$ <at> "; do
-- 
1.7.0

--

-- 
You received this message because you are subscribed to the Google Groups "beanstalk-talk" group.
To post to this group, send email to beanstalk-talk@...
To unsubscribe from this group, send email to beanstalk-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/beanstalk-talk?hl=en.

(Continue reading)


Gmane