Thanks for your input, I think I may of solved the issue. Its now been running for nearly 3 hours without stopping. I thought ill try replacing the ZMQ php lib files, encase they were old or the wrong ones. So hopefully that all was all it was.. although knowing my luck it will probably stop in a minute (because ive jinxed it now).Then there comes two options to my mind:
1. if it really hangs on recv(), it's ZMQ related issue and you can try another/newer version. When fixed timeout set, recv() should return FALSE even when network issues, etc.
2. Your script hangs/break somewhere else and it slipped out of your attention. I can only recommend to track down problematic place using log file(s). So dump to file what exactly is returned from recv(), what exactly is returned from uncompress, etc. Eventually, you can also set more "sensitive" error logging in PHP and check your error logs (you should also notice script timouts there).
If this is the case, ive just the problem of keeping a listener running. The only way I can do it is by leaving my own PC on (which isnt ideal). What I need to do is have a listener forward on the JSON to a particular address on my site (as the site should be running 24/7). However even just a few hours of EDDN data is a big improvement. Thank-you guys for setting it up, its a lot better than I had it before.
[update 1] well unfortunately it stop after 3 hours. looking at the logs, when there was 5 minutes of inactivity, it stop working. so it cant be to do with the script run time. im thinking its something to do with reconnection, so added these two;
Code:
$subscriber->setSockOpt(ZMQ:: SOCKOPT_RECONNECT_IVL, 300);
$subscriber->setSockOpt(ZMQ:: SOCKOPT_RECONNECT_IVL_MAX, 300);
Although I couldnt understand whats meant by 'initial reconnection' and 'max reconnection'.... im guessing thats in seconds? hopefully its not m/s. The documentation near useless.
[update 2] Still disconnected after 5 minutes of inactivity.
Last edited: