Giter Site home page Giter Site logo

Comments (7)

ghjm avatar ghjm commented on August 11, 2024

Can you give steps to reproduce this? I'm not seeing it in my own testing.

from python-receptor.

dehort avatar dehort commented on August 11, 2024

@ghjm I am using the receptor_http plugin to hit a web server that sleeps for 10 seconds on each request that it receives. I am using the receptor-controller to send multiple (10 for example) work requests down to the receptor node. The work requests simply hit the web server and block for 10 seconds. You can see that only one request is dispatched at a time. The spin loop will be triggered and the cpu usage will climb.

from python-receptor.

dehort avatar dehort commented on August 11, 2024

This is the simple sleepy web server that I'm using:

`
import asyncio
from aiohttp import web

async def hello(request):
print("got a request..")
await asyncio.sleep(10)
print("awake returning...")
return web.Response(text="Hello, world")

app = web.Application()
app.add_routes([web.get('/', hello)])

web.run_app(app, port="9000")
`

from python-receptor.

j00bar avatar j00bar commented on August 11, 2024

Thanks, @dehort - and we're confident this isn't the Controller only dispatching one at a time? It can be reproduced with receptor send from commandline?

from python-receptor.

dehort avatar dehort commented on August 11, 2024

@j00bar I'm pretty confident that this is not the controller. i can see where all the messages are sent to the receptor node at roughly the same time. It looks like receptor reads the messages off of the connection and adds them to the queue. They sit in the queue while the work request is processed.

from python-receptor.

ghjm avatar ghjm commented on August 11, 2024

This is what I'm using to test:

for a in {1..10}; do receptor send --directive receptor_http:execute foo '{"url": "http://localhost:9000", "method": "GET"}' & done

I see requests being executed in parallel, on both the devel and release_0.5 branches. I have not yet been able to observe the serialization behavior you're describing.

from python-receptor.

matburt avatar matburt commented on August 11, 2024

Closing for #167

from python-receptor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.