jsreport on Heroku: MongoDB credential changes



  • Hi!
    I have an issue with my jsreport instance on a Node application hosted on Heroku.
    Heroku changes its database credentials once every 3 days as far as I can tell.. The issue is that when this happes, my jsreport instance crashes throwing an error: unable to load planned schedules MongoError: server instance pool was destroyed

    As you can tell, I call the jsreport instance using the MONGODB_URI env variable.

    Is there a way to make jsreport access this env variable each time it needs database access instead of being stored as in-memory variable?

    thanks in advance!



  • Hmm. That looks strange, why is heroku doing it? Don't you run the mongo in replica set?
    Did you find this behavior in the heroku documentation somewhere?

    There is no way to adapt jsreport config in the runtime. It is static and fixed after application load.



  • I found out that all Dynos restart every midnight so the credentials refreshing is not the issue,.. this is happening once every 3 days... it's odd.
    All the reports rendering are being made by the API access.. using simple HTTP requests. Is there something I can do to dig a bit more about this issue?

    Thanks in advance!


  • administrators

    is there some relevant information in mongodb logs? maybe mongodb is closing the connections or doing something weird.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.