Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background Job via HTTP Protocol does not release the client #98

Closed
p-alik opened this issue Apr 6, 2017 · 3 comments
Closed

Background Job via HTTP Protocol does not release the client #98

p-alik opened this issue Apr 6, 2017 · 3 comments
Labels

Comments

@p-alik
Copy link
Collaborator

p-alik commented Apr 6, 2017

This is a part of #96

To reproduce:

  • run gearmand with HTTP support:
    gearmand --verbose DEBUG -p 4731 --protocol=http --http-port=8081
  • dispatch a background job via HTTP, which does not release the client as expected.
    curl --request POST --url 'http://127.0.0.1:8081/silviu' --header 'X-Gearman-Background: true' --data 'Hello world!'
  • gearmand logs:
DEBUG 2017-04-06 04:53:58.801040 [  main ] accept() fd:34 -> libgearman-server/gearmand.cc:874
   INFO 2017-04-06 04:53:58.801070 [  main ] Accepted connection from 127.0.0.1:57809
  DEBUG 2017-04-06 04:53:58.801108 [     4 ] Received CON wakeup event -> libgearman-server/gearmand_thread.cc:619
  DEBUG 2017-04-06 04:53:58.801147 [     4 ]       127.0.0.1:57809 Watching  POLLIN  -> libgearman-server/gearmand_thread.cc:151
   INFO 2017-04-06 04:53:58.801158 [     4 ] HTTP connection made
  DEBUG 2017-04-06 04:53:58.801280 [     4 ] 127.0.0.1:57809 Ready     POLLIN  -> libgearman-server/gearmand_con.cc:138
  DEBUG 2017-04-06 04:53:58.801312 [     4 ] read 194 bytes -> libgearman-server/io.cc:798
   INFO 2017-04-06 04:53:58.801320 [     4 ] Receiving HTTP response
  DEBUG 2017-04-06 04:53:58.801329 [     4 ] HTTP METHOD: POST -> libgearman-server/plugins/protocol/http/protocol.cc:340
  DEBUG 2017-04-06 04:53:58.801336 [     4 ] HTTP URI: "silviu" -> libgearman-server/plugins/protocol/http/protocol.cc:363
   INFO 2017-04-06 04:53:58.801356 [     4 ] Receiving HTTP response(finished)
  DEBUG 2017-04-06 04:53:58.801363 [     4 ] Received GEARMAN_SUBMIT_JOB_BG -> libgearman-server/thread.cc:311
  DEBUG 2017-04-06 04:53:58.801377 [     4 ]       127.0.0.1:57809 Watching  POLLIN  -> libgearman-server/gearmand_thread.cc:151
  DEBUG 2017-04-06 04:53:58.801403 [  proc ] PACKET COMMAND: GEARMAN_SUBMIT_JOB_BG -> libgearman-server/server.cc:119
  DEBUG 2017-04-06 04:53:58.801420 [  proc ] Received submission, function:silviu unique:- with 2 arguments -> libgearman-server/server.cc:248
  DEBUG 2017-04-06 04:53:58.801434 [  proc ] Comparing queue 0 to limit 0 for priority 1 -> libgearman-server/job.cc:175
  DEBUG 2017-04-06 04:53:58.801443 [  proc ] JOB H:batch0-01.lab.ip-platform.net:1 :2669963715 -> libgearman-server/job.cc:240
  DEBUG 2017-04-06 04:53:58.801450 [  proc ] __add -> libgearman-server/plugins/queue/default/queue.cc:72
  DEBUG 2017-04-06 04:53:58.801456 [  proc ] __flush -> libgearman-server/plugins/queue/default/queue.cc:80
 NOTICE 2017-04-06 04:53:58.801466 [  proc ] accepted,silviu,-,0 -> libgearman-server/server.cc:317
  DEBUG 2017-04-06 04:53:58.801538 [     4 ] Received RUN wakeup event -> libgearman-server/gearmand_thread.cc:624
  DEBUG 2017-04-06 04:53:58.801552 [     4 ] Sending HTTP told to ignore packet: gearmand_command_t:JOB_CREATED -> libgearman-server/plugins/protocol/http/protocol.cc:167
  DEBUG 2017-04-06 04:53:58.801560 [     4 ] Sent JOB_CREATED -> libgearman-server/thread.cc:356
  • even after the job is done by some worker the client remains bound
@silviucpp
Copy link

Another bug I think is that even if the clients sends HTTP 1.1 the server always answers with 1.0

This might create issues on some http clients becuase keep-alive is not part of 1.0

Silviu

@p-alik
Copy link
Collaborator Author

p-alik commented Apr 6, 2017

Thanks again. I'll improve that.

@esabol
Copy link
Member

esabol commented May 13, 2024

I've opened a new issue for HTTP/1.1 support, so I'm going to close this old issue since the original problem was fixed in PR #104.

@esabol esabol closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants