Skip to content
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

Laravel-mongodb crashes laravel when mongod crashes #30

Closed
programming-kid opened this issue Aug 28, 2013 · 4 comments
Closed

Laravel-mongodb crashes laravel when mongod crashes #30

programming-kid opened this issue Aug 28, 2013 · 4 comments

Comments

@programming-kid
Copy link

Laravel-MongoDB crashes Laravel when mongod crashes with following error

MongoClient::__construct(): send of 58 bytes failed with errno=10054
An existing connection was forcibly closed by the remote host. 

It doesn't get back to normal even after mongod is back up and running It only works when web server is restarted .

another laravel mongodb driver mongolid-laravel has same issue

@jenssegers
Copy link
Contributor

What would you suggest as a solution?

@programming-kid
Copy link
Author

when mongod goes down it should give Failed to connect to: db error and when it up again it should work as normal

i am not sure but i think there should be connection check before every query if connection is open it should go ahead with the query if connection check returns error it should close previous connection and open new connection and continue with querying

What do you suggest ??

@jenssegers
Copy link
Contributor

I'm closing this for now, as I don't think Laravel does this when connecting to an SQL database.

@programming-kid
Copy link
Author

i think it something to do with whoops i tried replicating error with native php MongoClient, but it fails silently but when i install whoops it gives the above error .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants