You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into an obscure issue that I can't figure out. So I set up a inbound channel that takes HTTP requests coming from a client. Then I take those requests off the channel, process them and put them back onto an outbound channel. The server then takes the modified requests off the outbound channel and replies back to the client. When I send 2 or more concurrent requests to the server, the outbound channel becomes corrupt after 2 puts.
The only difference I can tell is that when this issue happens the "takes" array is missing the object at the end of it. If I issue requests manually the array grows as I expect and that object remains at the end of the array.
Hi,
I'm running into an obscure issue that I can't figure out. So I set up a inbound channel that takes HTTP requests coming from a client. Then I take those requests off the channel, process them and put them back onto an outbound channel. The server then takes the modified requests off the outbound channel and replies back to the client. When I send 2 or more concurrent requests to the server, the outbound channel becomes corrupt after 2 puts.
This is what the outbound channel looks like BEFORE any requests are sent:
utbound
{ buf:
{ buf: { length: 0, array: [Object], head: 0, tail: 0 },
n: 100 },
xform:
{ '@@transducer/step': [Function],
'@@transducer/result': [Function] },
takes:
{ length: 1,
array: [ [Object], , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ],
head: 1,
tail: 0 },
puts:
{ length: 0,
array: [ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ],
head: 0,
tail: 0 },
dirty_takes: 1,
dirty_puts: 0,
closed: false }
And this is what it looks like AFTER 2 concurrent requests:
outbound
{ buf:
{ buf: { length: 0, array: [Object], head: 2, tail: 2 },
n: 100 },
xform:
{ '@@transducer/step': [Function],
'@@transducer/result': [Function] },
takes:
{ length: 0,
array: [ null, null, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ],
head: 2,
tail: 2 },
puts:
{ length: 0,
array: [ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ],
head: 0,
tail: 0 },
dirty_takes: 2,
dirty_puts: 0,
closed: false }
The only difference I can tell is that when this issue happens the "takes" array is missing the object at the end of it. If I issue requests manually the array grows as I expect and that object remains at the end of the array.
My code is in this gist: https://gist.github.com/rhasson/0460a2b261cf5422ec8f
The way to reproduce this problem is to run Apache Bench with concurrency of 2 or more, for example:
ab -n 4 -c 2 -p incomingcall.json -T 'application/json' -m POST http://localhost:9000/actions
Thanks,
Roy
The text was updated successfully, but these errors were encountered: