w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Failed to connect to: localhost:27017: Remote server has closed the connection' after Mongo 2.6 upgrade

Actually everything appeared to be simpler than that (I should blame only me and not php mongo driver):

I was using new Mongo(); to connect to database (which is apparently deprecated)

Instanciating this class will emit E_DEPRECATED warning, and turn off acknowledged writes.

Strangely enough I never saw this in my logs although I have E_ALL as my warning level. Anyway after I changed to recommended way new MongoClient(); the problem was solved.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.