#99 open
maiken

thin stop times out and fails

Reported by maiken | May 17th, 2009 @ 11:19 AM | in Waiting for EM

Repro:

  • Install ruby 1.9.1p129 (2009-05-12 revision 23412) and thin 1.2.1 on Ubuntu 8.04 LTS
  • Write a hello-world rackup file and save as hello_world.ru
app = proc do |env|
 [
  200,
  {
    'Content-Type' => 'text/html',
    'Content-Length' => '2'
  },
  ['hi']
 ]
end

run app
  • Start a cluster of thin processes: "thin start -s 3 -R hello_world.ru"
  • Now try to stop them: "thin stop -s 3"

Results:

Stopping server on 0.0.0.0:3000 ... 
Sending QUIT signal to process 31975 ... 
Timeout!
Stopping server on 0.0.0.0:3001 ... 
Sending QUIT signal to process 31988 ... 
Timeout!
Stopping server on 0.0.0.0:3002 ... 
Sending QUIT signal to process 32001 ... 
Timeout!

thin processes are still running.

the thin processes aren't responsive to a regular "kill ", either.
However, if I load from their respective ports, they process the quit request and exit. That is, if, while "thin stop" is trying to stop the port-3000 daemon, I do an HTTP load against port 3000, the process will exit. Without the load, the process will run forever.

Expect: thin processes are responsive to quit requests.

If you have difficulty reproducing the issue let me know how to take additional traces.

Comments and changes to this ticket

  • macournoyer

    macournoyer May 18th, 2009 @ 09:06 AM

    • State changed from “new” to “open”

    It do look like an old eventmachine issue, can you try updating to latest version of EM?

  • macournoyer

    macournoyer May 21st, 2009 @ 02:13 PM

    • Milestone changed from Future to Waiting for EM

    There was a similar issue in previous version but under 1.8 iirc. If it works w/out epoll it probably is an EventMachine issue. You should ask eventmachine ppl about it:

    http://groups.google.com/group/eventmachine/topics
    or #eventmachine on freenode

  • macournoyer

    macournoyer May 29th, 2009 @ 04:44 PM

    oh yes, Thin uses eventmachine exclusively, unless you explicitly specify a backend using the --backend option.

  • John

    John September 17th, 2024 @ 01:04 PM

    Este ușor să fii de acord cănu există multe cazinouri online mari. Este foarte dificil să găsești un cazinou online de încredere și de încredere. Am jucat la ice casino rotiri gratuite furnizorul de cazinou online ice casino rotiri gratuite pentru o lungă perioadă de timp și nu pot spune nimic rău despre el, a spus el, Conform statisticilor, acest https://ice-casino-ro.com/rotiri-gratuite/ cazinou online are cel mai mare RTP

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages