I have problem. I use Jmeter for test site, and after open connection after write/read samplers, after ~40 sec my socket closed and test stops. I can every 40 sec open connection or else?
Screenshot
You have 2 options:
First open a WebSocket Connection by executing WebSocket Open Connection
and then tick use existing connection
box in the WebSocket Single Read Sampler
Or alternatively you can open a new connection each time you execute the WebSocket Single Read Sampler
If the client you're trying to simulate opens a single connection and then executes multiple reads - you should go for option 1 and vice versa.
If the connection gets broken in the middle somewhere somehow you need to find a reason for this, i.e. enable debug logging for WebSocket Samplers by adding the next line to log4j2.xml file:
<Logger name="eu.luminis" level="debug" />
and inspect jmeter.log file for any suspicious entries