JohnC
"Error: connection already closed."
So here is the info from the Django documentation. The default value is 0 , preserving the historical behavior of closing the database connection at the end of each request. To enable persistent connections, set CONN_MAX_AGE to a positive integer of seconds. For unlimited persistent connections, set it to None .
28 replies
"Error: connection already closed."
What does not make sense is that I am able to update the users during their sessions in the database while interacting with the frontend (decrementing available entries). But as soon as a payment is made and I go to update the user so they have these features I get an error that connection is closed.
28 replies
"Error: connection already closed."
I have a Django backend application that is deployed on your platform that interacts with a postgreSQL database on your platform as well. I have Django handling the backend and React handling the frontend. It is a SPA application that offers user authorization, interaction with forms where the user enters a numerical set and that set is used to create a matrix and then deconstructed into a set of numerical sets and then displayed to the user on the frontend. Each time a user enters a set the backend/frontend updates (decrements a daily entry count). There are several pages that are injected via React router. I have not had any issues with this part of the application. However, when a standard user navigates to the payment page and makes a purchase using the Stripe API, the transactions go through and the webhook executes after a successful payment ( I have no issues there either). The webhook uses an apScheduler to setup a cron job 30 seconds after a successful payment, and it is during this time that causes the error. So the cron job executes 30 seconds after the webhook finishes execution. In this function the user is accessed via stripe_checkout_id (foreign-key) and then updated in the user_table (changes from standard user to whatever membership was purchased) and updates entry fields as well. It is only during this process that I see the error. I am sorry if I am being to Verbose.
28 replies