connection closed before sending headers

Asked by 江红

When I run web-polygraph 4.0.10,I met some errors “connection closed before sending headers”,and polygraph shutdown after a while.How can I solve this problem?

When I Setting lower request rate,I found there're more such errors appear.

Thanks.

Cathy

Question information

Language:
English Edit question
Status:
Solved
For:
Polygraph Edit question
Assignee:
No assignee Edit question
Solved by:
江红
Solved:
Last query:
Last reply:
Revision history for this message
江红 (jhcathy) said :
#1

I what know how many xact/sec the cache can support,how can I test it?Thanks

Revision history for this message
Dmitry Kurochkin (dmitry.kurochkin) said :
#2

The "connection closed before sending headers" errors may be caused by persistent connection races. There are not so many of them in your logs - about 1% of all transactions on client, and much less on server. You should ignore them for now, this is not the reason why the test fails.

The real problem are these errors on client side:

 1281583684.167296| EphPortMgr.cc:23: error: 1/309 (s98) Address already in use
 1281583684.167296| OS probably ran out of ephemeral ports at 10.102.1.94:0
 1281583684.167296| Client.cc:335: error: 1/310 (c62) failed to establish a connection

This may happen because the ephemeral port range is too small and there are too many connections in TIME_WAIT state. Run

 $ cat /proc/sys/net/ipv4/ip_local_port_range

to get the configured port range on Linux system. It is possible to make it larger with something like:

 # echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range

While the test is running you can see how many connections are in TIME_WAIT state with:

 $ netstat -tn | grep -c TIME_WAIT

As for how to know how many xact/sec the cache can support. In summary, you need to mimic expected production environment and then increase the load until the cache can no longer support it. Caching and other long-term side-effects make it difficult. There are two ways to increase load during the test: so called "boiler frog" workload and run-time load adjustment.

Here is some more info on the topic http://article.gmane.org/gmane.comp.web.web-polygraph.user/605

How to make a "boiler frog" workload: http://article.gmane.org/gmane.comp.web.web-polygraph.user/1250

Run-time load adjustment documentation: http://www.web-polygraph.org/docs/userman/inflight.html

Note that PolyMix-4 workload increases load by increasing the populus factor, instead of the load factor.

Regards,
  Dmitry

Revision history for this message
江红 (jhcathy) said :
#3

Thanks a lot.I'll try it later.