-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persistent connection #72
Comments
A connection is still created once when the PHP process starts and persists until the PHP process closes. How many requests you can handle with the same connection depends on your web server config. If you are running PHP as an apache module f.e., then PHP is tied to Apache's process, so the connection will only be gone if you restart Apache. In the case of FastCGI, there's a "recycle" time and number of requests. Whenever a "recycle" occurs, persistent data is lost. |
I use Apache module. So it means that the connection remains open until Apache is restarted. Even so, whenever I make a request, a new connection is initiated with mikrotik (but not closed). What I need is for a function to start the connection with mikrotik and when I have a new request, it should be done with the connection that is already open. How do I save this open connection for use in subsequent requests? ie:
|
There is no persistentId property, so how are you getting that? Anyway... I'm not entirely sure why that happens. Can you give me your versions involved? Apache version, PHP version, APC(u) version, MikroTik version, OS version? Any one of those could be the cause, as persistent connections are kind of a hack job to be honest. |
I did not understand how to use the persistent connection.
I activated the 5th element and it is generating the persistentId.
But how do I access the API without it opening a new connection?
The text was updated successfully, but these errors were encountered: