Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Zeus Breaks on Long Command Line Input #254

andyl opened this Issue · 7 comments

4 participants


I have a test shell that generates an rspec command with a list of _spec files to run. When the command grows beyond 1000 characters or so in length, zeus fails with a command-line parse error.

The workaround is to run rspec with a short Glob pattern instead of a long list of files. But that doesn't work for me, because sometimes the list of _spec files is determined by other factors than the filename, so Glob matching doesn't always work.


Here's some more elaboration on this issue - this is from the RubyMine bug tracker at

Hey Colin, I found that the names of all the spec files in my project together lead to a longer string than the zeus server expects to read from its clients, so that it was chopping off some of the names of the files. I hacked my zeus gem at this line - - to change the number of bytes read (currently 1024) to a bigger value (2**16 worked for me), and that fixed it for me. I've been meaning to put an issue in with burke about it on Github.

@andyl andyl referenced this issue from a commit in andyl/zeus
@andyl andyl Update rubygem/lib/zeus.rb
Fixes Issue #254
@rtlong rtlong referenced this issue from a commit in rtlong/zeus
@rtlong rtlong Increase read buffer, allow more arguments
This is to fix the same problem reported in #254; 
Even with the fix in #255, I'm still seeing this issue. 

I chose 2**16 to match what @andyl did in adc5766d

Just ran into this issue. Seems it was fixed 3 months ago but the gem was not updated?

Added this script to one of our projects as a workaround in case anyone needs something similar:


set -e
gem install zeus -v 0.13.3

# This has been patched upstream but not released
printf "Patching zeus to make it possible to run the entire test suite with zeus... "
cat ~/.gem/gems/zeus-0.13.3/lib/zeus.rb | ruby -e 'puts { |line| line.include?("pid_and_arguments = local.recv(1024)") ? line.sub("1024", "2**16") : line }' > /tmp/a && mv /tmp/a ~/.gem/gems/zeus-0.13.3/lib/zeus.rb
echo "done"
@burke burke closed this in 695a2d5

Is this fix in the darn gem yet? I just bundle updated and it still breaks on a glob pattern that incorporates the test files in our test suite... :)


Still broken for me, using Zeus 0.13.3. Have to manually patch after every install.


try 0.13.4.pre2


@sevos - that did it - at last. 0.13.4.pre2 worked w/o patching. thank you!


after installing pre2, I still get "clienthandler.go:102: write unixgram : message too long" when giving zeus the command

zeus test test/**/api/v2/{**,}/*_test.rb

which matches about 60 test files in our suite

>> Dir.glob("test/**/api/v2/{**,}/*_test.rb").length
#=> 60

I've worked around it in the meantime by just creating a new Rake task with this pattern match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.