johnlpage / POCDriver

Workload Driver for MongoDB in Java
Other
204 stars 87 forks source link

Error: Prematurely reached end of stream during Replicaset failover #35

Closed j3ffrw closed 3 years ago

j3ffrw commented 5 years ago

Hi, I have a Atlas(4.0.9 on M10..M30) 3 node Replicaset and when I perform "failover test" or node upgrade w/c essentially restarts a primary and trigger an election I got the following error. Error: Prematurely reached end of stream and POCDriver exits, but sometimes it survives and continue running. Here's what I use to run POCDriver: java -jar POCDriver.jar -k 20 -i 10 -u 10 -b 20 -c "mongodb+srv://username:password@mygcpcluster-miepv.gcp.mongodb.net/test?retryWrites=true". I've alredy tried playing around different connection settings maxIdleTimeMS=100000&autoReconnect=true&connectTimeoutMS=300000 but still the same, sometimes POCDriver survive a failover sometimes not. Looks like the the worker thread dies one by one until none is left. Is there a way for POCDriver to maintain the number of threads if a thread dies?

johnlpage commented 3 years ago

I think this is now fixed.