-
Notifications
You must be signed in to change notification settings - Fork 168
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
MongoDB extension support #145
Comments
I don't recommend to use MongoDB in PM server. The extension was designed for web application, the MongoDB connection will close after the script end. There is no way to close the Mongo connection like |
would it be better to access mongodb with a userspace library instead? |
I don't think this is a concern. The reason they implemented it like this is so that different PHP web requests can reuse the same client without having to reestablish connections. In the PM context, every thread is a request. Unless you have a habit of establishing large numbers of MongoDB connections to many different databases, I don't really think this is a problem. |
so is the mongodb instance freed when a thread exits? if that is the case, it sounds reasonable. |
So far as I understand, no. But in any case, I don't think it matters. |
For example, in terms of network errors, would it still leak a resource even though connection breaks? |
In any case, it is up to the developer in this case to pay attention to all the tools he uses and to get informed about them. |
Note that the use of mongodb itself is highly controversial due to its lack of consistency in its opinionated preference over simplicity. |
This binary contains direct support for mysql and sqlite however as soon as we want to use another database such as mongo, it is mandatory to create our own fork and to modify it ourselves.
Seeing the increasing demand for this extension, I think it would be a good idea to add it. In any case, it is always possible to disable it in the php.ini
The text was updated successfully, but these errors were encountered: