Occasional error in logs (running wordpress)

I'm running a WordPress site on OpenLiteSpeed 1.7.12.
I can see this error in the logs (lsws/logs/error.log) once or twice a day. what does it mean please?

[....#wordpress] [modcompress---] compressbuf in 16384, return -1 (written 0, flag in 0)

Might not be related, but the server is also returning 502 once or twice a day but it's a very small portion of the total requests.
Server is behind a gateway so I can see the 502's there.
I didn't find a correlation between the time of the errors and the 502's.

Do you have any core files being generated in /tmp/lshttpd/bak_core during the 502?
I don't see "bak_core" in that path.

At first I had occasional 502's even before really going live, so even when traffic was low.
Once traffic went up the server crashed at some point.
Now its very minimal after I adjusted some settings.
I'm not even sure what it was. Mostly edited server configuration > external app: I increased max connections (from 35 to 100). turned off persistent connections. added PHP_LSAPI_CHILDREN=100.

I didn't really find a good guide for WordPress. I'm also using the WordPress litespeed-cache plugin btw.