tswaters / react-thread-poc

Proof of concept for offloading react server rendering to a thread.
10 stars 1 forks source link

Betterthread falls over on mac #7

Open vjpr opened 5 years ago

vjpr commented 5 years ago
Running betterthread bench for 1000 elements with 100000 requested, 1000 concurrency
This is ApacheBench, Version 2.3 <$Revision: 1826891 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 10000 requests
apr_socket_recv: Connection reset by peer (54)
Total of 15092 requests completed

I wonder what apr_socket_recv: Connection reset by peer (54) means?

tswaters commented 5 years ago

AH! I get this as well on my windows machine when running ab through bash via WSL.

It seems very sporadic whether it will work or fail. That image I have linked is actually a composite sketch of runs under windows bash that actually succeeded with the defined parameters.

I've got some changes in my worktree, bench.cmd that uses the ab compiled against windows, not downloaded through apt-get in the linux env and have had decent results with better reliability.

As for why it fails for you -- I'm not entirely sure but my guess is not enough sockets to go around - performing 1K concurrent requests to a server on localhost, I imagine, requires quite a few sockets.

I did see some results when googling my issue that may be relevant to you - I mostly ignored them due to not being on a mac and focusing on the intricacies of the wsl kernel interface to windows.