Ticket #3095 (closed Bugs: fixed)
bug in automatic resizing of the bucket array
|Reported by:||roger.ran@…||Owned by:||chris_kohlhoff|
we have many stable server application that runs on Windows and using asio IOCP model (boost 1.38.0)
e.g. One of it always handles 500+ incoming connections and for each connection it will create a new local network connection to a database server. It runs very stable for weeks. the stats shows that the incoming connection number is 500 and the outgoing connections is about 5 (the local network runs much faster).
However, after upgrade to boost 1.39.0, they do not work any more! it always stop working after a few minutes of startup. The stats shows that the incoming connection number is 500 and the outgoing connections keep increasing from 1 to 300+.
We roll back to asio in boost 1.38.0, it works again.
Thus, I apply all the asio patches between 1.38.0 and 1.39.0 one by one and find out that this is caused by the Changeset .
Now I am using the 1.39.0 but add one line to disable the auto resize feature
#define BOOST_ASIO_HASH_MAP_BUCKETS 1021
Now every thing runs very well. So there must be some bug in the bug in automatic resizing function.