MongoDb connection problem

Good day Community,

I have a python plotly dash app connected to a mongoDb.

The local app runs without any problems but my deployed version is not running (it seems that it does not want to connect to mongodb)

Is there something to be set up on render for this or anything I can try? Desperate for assistance

My python connection is as follows:
client = pymongo.MongoClient(‘mongodb+srv://’,tlsCAFile=certifi.where())
#select database
db = client[‘test’]
#select the collection within the database
df_AS = db.newassets

The error I receive is: Worker with pid 93 was terminated due to signal 9

Hi there,

Thanks for reaching out.

Unfortunately, there’s not a lot to go on here, please could you share some more specific details of the issue you are experiencing that may help us troubleshoot it with you, e.g. any logs/errors/output, service name/ID, reproduction steps, etc. If you don’t want to share these details on the community forum, please feel free to raise a ticket from the “Contact Support” link at the bottom of the Dashboard.



Hi @al_ps , thanks for your response.

it seems like there is a problem with this specific step, and I am unsure how to debug because it runs on my local machine…

    print('Created Data frame lifecycel re_evaluated_value succesully')
    def val1(row):
        if pd.isnull(row.re_evaluated_value):
            return row['Cost_Value']
            return row['re_evaluated_value']
    lifecycle_tbl['Val1'] = lifecycle_tbl.apply(val1, axis=1) 
    print('Created Data frame lifecycel val1 succesully')

Could this be a memory issue? I’m not a Python export, but searching for reasons why gunicorn workers would be terminated, brought up this StackOverflow answer that matches the error.


I dont think it is on Python side, It may be the timeout limit on Render side? Is there a way to increase the timeout limit ?

I was suggesting it’s a memory issue, not a Python issue. The logs you shared show a worker being killed, which could be related to memory issues. This isn’t a Render timeout, and I don’t think this is a timeout issue in general. However, there are timeout options for gunicorn, which are covered in the gunicorn docs if you wanted to try that.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.