Ticket #35685: error_log_after_minor_adjustments

File error_log_after_minor_adjustments, 54.7 KB (added by Tharinda Seth Wijesekera, 4 months ago)
Line 
1ework/views.py", line 324, in perform_authentication
2 request.user
3 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 231, in user
4 self._authenticate()
5 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 384, in _authenticate
6 user_auth_tuple = authenticator.authenticate(self)
7 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 30, in authenticate
8 return self.authenticate_credentials(request)
9 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 54, in authenticate_credentials
10 user = ELearningUserTokenManager().check_user(username, user_id)
11 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_user_token_manager.py", line 104, in check_user
12 user_model = get_user_model().objects.using("default").filter(username=username, deleted=False).first()
13 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1097, in first
14 for obj in queryset[:1]:
15 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 400, in __iter__
16 self._fetch_all()
17 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1928, in _fetch_all
18 self._result_cache = list(self._iterable_class(self))
19 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 91, in __iter__
20 results = compiler.execute_sql(
21 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1572, in execute_sql
22 cursor = self.connection.cursor()
23 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
24 return func(*args, **kwargs)
25 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 320, in cursor
26 return self._cursor()
27 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 296, in _cursor
28 self.ensure_connection()
29 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
30 return func(*args, **kwargs)
31 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
32 with self.wrap_database_errors:
33 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
34 raise dj_exc_value.with_traceback(traceback) from exc_value
35 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
36 self.connect()
37 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
38 return real_connect(self)
39 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
40 return func(*args, **kwargs)
41 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
42 self.connection = self.get_new_connection(conn_params)
43 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
44 connection = super().get_new_connection(conn_params)
45 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
46 return func(*args, **kwargs)
47 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
48 connection = self.pool.getconn()
49 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
50 raise PoolTimeout(
51django.db.utils.OperationalError: couldn't get a connection after 30.00 sec
522024-08-16 20:59:02,255 - 9E6VAQ - MindlineCommonMiddleware - [DEBUG] Outgoing Response: 500 Internal Server Error
53Internal Server Error: /api/icbt/programs
54[16/Aug/2024 20:59:02] "GET /api/icbt/programs HTTP/1.1" 500 120
552024-08-16 20:59:02,746 - IV4Y7S - mindline.exceptions.exception_handler - [ERROR] Unknown Exception: couldn't get a connection after 30.00 sec
56Traceback (most recent call last):
57 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
58 self.connect()
59 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
60 return real_connect(self)
61 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
62 return func(*args, **kwargs)
63 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
64 self.connection = self.get_new_connection(conn_params)
65 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
66 connection = super().get_new_connection(conn_params)
67 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
68 return func(*args, **kwargs)
69 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
70 connection = self.pool.getconn()
71 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
72 raise PoolTimeout(
73psycopg_pool.PoolTimeout: couldn't get a connection after 30.00 sec
74
75The above exception was the direct cause of the following exception:
76
77Traceback (most recent call last):
78 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 497, in dispatch
79 self.initial(request, *args, **kwargs)
80 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 315, in sentry_patched_drf_initial
81 return old_drf_initial(self, request, *args, **kwargs)
82 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 414, in initial
83 self.perform_authentication(request)
84 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 324, in perform_authentication
85 request.user
86 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 231, in user
87 self._authenticate()
88 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 384, in _authenticate
89 user_auth_tuple = authenticator.authenticate(self)
90 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 30, in authenticate
91 return self.authenticate_credentials(request)
92 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 54, in authenticate_credentials
93 user = ELearningUserTokenManager().check_user(username, user_id)
94 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_user_token_manager.py", line 104, in check_user
95 user_model = get_user_model().objects.using("default").filter(username=username, deleted=False).first()
96 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1097, in first
97 for obj in queryset[:1]:
98 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 400, in __iter__
99 self._fetch_all()
100 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1928, in _fetch_all
101 self._result_cache = list(self._iterable_class(self))
102 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 91, in __iter__
103 results = compiler.execute_sql(
104 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1572, in execute_sql
105 cursor = self.connection.cursor()
106 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
107 return func(*args, **kwargs)
108 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 320, in cursor
109 return self._cursor()
110 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 296, in _cursor
111 self.ensure_connection()
112 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
113 return func(*args, **kwargs)
114 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
115 with self.wrap_database_errors:
116 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
117 raise dj_exc_value.with_traceback(traceback) from exc_value
118 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
119 self.connect()
120 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
121 return real_connect(self)
122 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
123 return func(*args, **kwargs)
124 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
125 self.connection = self.get_new_connection(conn_params)
126 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
127 connection = super().get_new_connection(conn_params)
128 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
129 return func(*args, **kwargs)
130 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
131 connection = self.pool.getconn()
132 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
133 raise PoolTimeout(
134django.db.utils.OperationalError: couldn't get a connection after 30.00 sec
1352024-08-16 20:59:02,752 - IV4Y7S - MindlineCommonMiddleware - [DEBUG] Outgoing Response: 500 Internal Server Error
136Internal Server Error: /api/icbt/programs
137[16/Aug/2024 20:59:02] "GET /api/icbt/programs HTTP/1.1" 500 120
1382024-08-16 20:59:03,030 - L2C15O - mindline.exceptions.exception_handler - [ERROR] Unknown Exception: couldn't get a connection after 30.00 sec
139Traceback (most recent call last):
140 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
141 self.connect()
142 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
143 return real_connect(self)
144 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
145 return func(*args, **kwargs)
146 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
147 self.connection = self.get_new_connection(conn_params)
148 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
149 connection = super().get_new_connection(conn_params)
150 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
151 return func(*args, **kwargs)
152 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
153 connection = self.pool.getconn()
154 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
155 raise PoolTimeout(
156psycopg_pool.PoolTimeout: couldn't get a connection after 30.00 sec
157
158The above exception was the direct cause of the following exception:
159
160Traceback (most recent call last):
161 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 497, in dispatch
162 self.initial(request, *args, **kwargs)
163 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 315, in sentry_patched_drf_initial
164 return old_drf_initial(self, request, *args, **kwargs)
165 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 414, in initial
166 self.perform_authentication(request)
167 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 324, in perform_authentication
168 request.user
169 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 231, in user
170 self._authenticate()
171 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 384, in _authenticate
172 user_auth_tuple = authenticator.authenticate(self)
173 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 30, in authenticate
174 return self.authenticate_credentials(request)
175 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 54, in authenticate_credentials
176 user = ELearningUserTokenManager().check_user(username, user_id)
177 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_user_token_manager.py", line 104, in check_user
178 user_model = get_user_model().objects.using("default").filter(username=username, deleted=False).first()
179 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1097, in first
180 for obj in queryset[:1]:
181 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 400, in __iter__
182 self._fetch_all()
183 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1928, in _fetch_all
184 self._result_cache = list(self._iterable_class(self))
185 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 91, in __iter__
186 results = compiler.execute_sql(
187 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1572, in execute_sql
188 cursor = self.connection.cursor()
189 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
190 return func(*args, **kwargs)
191 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 320, in cursor
192 return self._cursor()
193 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 296, in _cursor
194 self.ensure_connection()
195 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
196 return func(*args, **kwargs)
197 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
198 with self.wrap_database_errors:
199 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
200 raise dj_exc_value.with_traceback(traceback) from exc_value
201 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
202 self.connect()
203 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
204 return real_connect(self)
205 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
206 return func(*args, **kwargs)
207 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
208 self.connection = self.get_new_connection(conn_params)
209 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
210 connection = super().get_new_connection(conn_params)
211 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
212 return func(*args, **kwargs)
213 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
214 connection = self.pool.getconn()
215 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
216 raise PoolTimeout(
217django.db.utils.OperationalError: couldn't get a connection after 30.00 sec
2182024-08-16 20:59:03,036 - L2C15O - MindlineCommonMiddleware - [DEBUG] Outgoing Response: 500 Internal Server Error
219Internal Server Error: /api/icbt/programs
220[16/Aug/2024 20:59:03] "GET /api/icbt/programs HTTP/1.1" 500 120
2212024-08-16 20:59:03,555 - Y4B6AF - mindline.exceptions.exception_handler - [ERROR] Unknown Exception: couldn't get a connection after 30.00 sec
222Traceback (most recent call last):
223 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
224 self.connect()
225 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
226 return real_connect(self)
227 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
228 return func(*args, **kwargs)
229 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
230 self.connection = self.get_new_connection(conn_params)
231 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
232 connection = super().get_new_connection(conn_params)
233 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
234 return func(*args, **kwargs)
235 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
236 connection = self.pool.getconn()
237 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
238 raise PoolTimeout(
239psycopg_pool.PoolTimeout: couldn't get a connection after 30.00 sec
240
241The above exception was the direct cause of the following exception:
242
243Traceback (most recent call last):
244 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 497, in dispatch
245 self.initial(request, *args, **kwargs)
246 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 315, in sentry_patched_drf_initial
247 return old_drf_initial(self, request, *args, **kwargs)
248 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 414, in initial
249 self.perform_authentication(request)
250 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 324, in perform_authentication
251 request.user
252 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 231, in user
253 self._authenticate()
254 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 384, in _authenticate
255 user_auth_tuple = authenticator.authenticate(self)
256 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 30, in authenticate
257 return self.authenticate_credentials(request)
258 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 54, in authenticate_credentials
259 user = ELearningUserTokenManager().check_user(username, user_id)
260 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_user_token_manager.py", line 104, in check_user
261 user_model = get_user_model().objects.using("default").filter(username=username, deleted=False).first()
262 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1097, in first
263 for obj in queryset[:1]:
264 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 400, in __iter__
265 self._fetch_all()
266 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1928, in _fetch_all
267 self._result_cache = list(self._iterable_class(self))
268 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 91, in __iter__
269 results = compiler.execute_sql(
270 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1572, in execute_sql
271 cursor = self.connection.cursor()
272 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
273 return func(*args, **kwargs)
274 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 320, in cursor
275 return self._cursor()
276 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 296, in _cursor
277 self.ensure_connection()
278 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
279 return func(*args, **kwargs)
280 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
281 with self.wrap_database_errors:
282 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
283 raise dj_exc_value.with_traceback(traceback) from exc_value
284 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
285 self.connect()
286 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
287 return real_connect(self)
288 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
289 return func(*args, **kwargs)
290 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
291 self.connection = self.get_new_connection(conn_params)
292 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
293 connection = super().get_new_connection(conn_params)
294 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
295 return func(*args, **kwargs)
296 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
297 connection = self.pool.getconn()
298 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
299 raise PoolTimeout(
300django.db.utils.OperationalError: couldn't get a connection after 30.00 sec
3012024-08-16 20:59:03,561 - Y4B6AF - MindlineCommonMiddleware - [DEBUG] Outgoing Response: 500 Internal Server Error
302Internal Server Error: /api/icbt/programs
303[16/Aug/2024 20:59:03] "GET /api/icbt/programs HTTP/1.1" 500 120
3042024-08-16 20:59:03,635 - ODR3W8 - mindline.exceptions.exception_handler - [ERROR] Unknown Exception: couldn't get a connection after 30.00 sec
305Traceback (most recent call last):
306 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
307 self.connect()
308 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
309 return real_connect(self)
310 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
311 return func(*args, **kwargs)
312 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
313 self.connection = self.get_new_connection(conn_params)
314 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
315 connection = super().get_new_connection(conn_params)
316 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
317 return func(*args, **kwargs)
318 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
319 connection = self.pool.getconn()
320 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
321 raise PoolTimeout(
322psycopg_pool.PoolTimeout: couldn't get a connection after 30.00 sec
323
324The above exception was the direct cause of the following exception:
325
326Traceback (most recent call last):
327 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 497, in dispatch
328 self.initial(request, *args, **kwargs)
329 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 315, in sentry_patched_drf_initial
330 return old_drf_initial(self, request, *args, **kwargs)
331 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 414, in initial
332 self.perform_authentication(request)
333 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 324, in perform_authentication
334 request.user
335 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 231, in user
336 self._authenticate()
337 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 384, in _authenticate
338 user_auth_tuple = authenticator.authenticate(self)
339 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 30, in authenticate
340 return self.authenticate_credentials(request)
341 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 54, in authenticate_credentials
342 user = ELearningUserTokenManager().check_user(username, user_id)
343 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_user_token_manager.py", line 104, in check_user
344 user_model = get_user_model().objects.using("default").filter(username=username, deleted=False).first()
345 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1097, in first
346 for obj in queryset[:1]:
347 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 400, in __iter__
348 self._fetch_all()
349 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1928, in _fetch_all
350 self._result_cache = list(self._iterable_class(self))
351 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 91, in __iter__
352 results = compiler.execute_sql(
353 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1572, in execute_sql
354 cursor = self.connection.cursor()
355 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
356 return func(*args, **kwargs)
357 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 320, in cursor
358 return self._cursor()
359 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 296, in _cursor
360 self.ensure_connection()
361 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
362 return func(*args, **kwargs)
363 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
364 with self.wrap_database_errors:
365 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
366 raise dj_exc_value.with_traceback(traceback) from exc_value
367 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
368 self.connect()
369 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
370 return real_connect(self)
371 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
372 return func(*args, **kwargs)
373 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
374 self.connection = self.get_new_connection(conn_params)
375 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
376 connection = super().get_new_connection(conn_params)
377 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
378 return func(*args, **kwargs)
379 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
380 connection = self.pool.getconn()
381 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
382 raise PoolTimeout(
383django.db.utils.OperationalError: couldn't get a connection after 30.00 sec
3842024-08-16 20:59:03,641 - ODR3W8 - MindlineCommonMiddleware - [DEBUG] Outgoing Response: 500 Internal Server Error
385Internal Server Error: /api/icbt/programs
386[16/Aug/2024 20:59:03] "GET /api/icbt/programs HTTP/1.1" 500 120
3872024-08-16 20:59:03,876 - 4JLA7K - mindline.exceptions.exception_handler - [ERROR] Unknown Exception: couldn't get a connection after 30.00 sec
388Traceback (most recent call last):
389 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
390 self.connect()
391 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
392 return real_connect(self)
393 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
394 return func(*args, **kwargs)
395 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
396 self.connection = self.get_new_connection(conn_params)
397 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
398 connection = super().get_new_connection(conn_params)
399 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
400 return func(*args, **kwargs)
401 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
402 connection = self.pool.getconn()
403 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
404 raise PoolTimeout(
405psycopg_pool.PoolTimeout: couldn't get a connection after 30.00 sec
406
407The above exception was the direct cause of the following exception:
408
409Traceback (most recent call last):
410 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 497, in dispatch
411 self.initial(request, *args, **kwargs)
412 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 315, in sentry_patched_drf_initial
413 return old_drf_initial(self, request, *args, **kwargs)
414 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 414, in initial
415 self.perform_authentication(request)
416 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 324, in perform_authentication
417 request.user
418 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 231, in user
419 self._authenticate()
420 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 384, in _authenticate
421 user_auth_tuple = authenticator.authenticate(self)
422 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 30, in authenticate
423 return self.authenticate_credentials(request)
424 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 54, in authenticate_credentials
425 user = ELearningUserTokenManager().check_user(username, user_id)
426 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_user_token_manager.py", line 104, in check_user
427 user_model = get_user_model().objects.using("default").filter(username=username, deleted=False).first()
428 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1097, in first
429 for obj in queryset[:1]:
430 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 400, in __iter__
431 self._fetch_all()
432 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1928, in _fetch_all
433 self._result_cache = list(self._iterable_class(self))
434 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 91, in __iter__
435 results = compiler.execute_sql(
436 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1572, in execute_sql
437 cursor = self.connection.cursor()
438 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
439 return func(*args, **kwargs)
440 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 320, in cursor
441 return self._cursor()
442 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 296, in _cursor
443 self.ensure_connection()
444 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
445 return func(*args, **kwargs)
446 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
447 with self.wrap_database_errors:
448 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
449 raise dj_exc_value.with_traceback(traceback) from exc_value
450 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
451 self.connect()
452 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
453 return real_connect(self)
454 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
455 return func(*args, **kwargs)
456 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
457 self.connection = self.get_new_connection(conn_params)
458 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
459 connection = super().get_new_connection(conn_params)
460 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
461 return func(*args, **kwargs)
462 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
463 connection = self.pool.getconn()
464 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
465 raise PoolTimeout(
466django.db.utils.OperationalError: couldn't get a connection after 30.00 sec
4672024-08-16 20:59:03,882 - 4JLA7K - MindlineCommonMiddleware - [DEBUG] Outgoing Response: 500 Internal Server Error
468Internal Server Error: /api/icbt/programs
469[16/Aug/2024 20:59:03] "GET /api/icbt/programs HTTP/1.1" 500 120
4702024-08-16 20:59:04,401 - JO114A - mindline.exceptions.exception_handler - [ERROR] Unknown Exception: couldn't get a connection after 30.00 sec
471Traceback (most recent call last):
472 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
473 self.connect()
474 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
475 return real_connect(self)
476 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
477 return func(*args, **kwargs)
478 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
479 self.connection = self.get_new_connection(conn_params)
480 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
481 connection = super().get_new_connection(conn_params)
482 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
483 return func(*args, **kwargs)
484 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
485 connection = self.pool.getconn()
486 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
487 raise PoolTimeout(
488psycopg_pool.PoolTimeout: couldn't get a connection after 30.00 sec
489
490The above exception was the direct cause of the following exception:
491
492Traceback (most recent call last):
493 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 497, in dispatch
494 self.initial(request, *args, **kwargs)
495 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 315, in sentry_patched_drf_initial
496 return old_drf_initial(self, request, *args, **kwargs)
497 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 414, in initial
498 self.perform_authentication(request)
499 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 324, in perform_authentication
500 request.user
501 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 231, in user
502 self._authenticate()
503 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 384, in _authenticate
504 user_auth_tuple = authenticator.authenticate(self)
505 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 30, in authenticate
506 return self.authenticate_credentials(request)
507 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 54, in authenticate_credentials
508 user = ELearningUserTokenManager().check_user(username, user_id)
509 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_user_token_manager.py", line 104, in check_user
510 user_model = get_user_model().objects.using("default").filter(username=username, deleted=False).first()
511 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1097, in first
512 for obj in queryset[:1]:
513 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 400, in __iter__
514 self._fetch_all()
515 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1928, in _fetch_all
516 self._result_cache = list(self._iterable_class(self))
517 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 91, in __iter__
518 results = compiler.execute_sql(
519 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1572, in execute_sql
520 cursor = self.connection.cursor()
521 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
522 return func(*args, **kwargs)
523 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 320, in cursor
524 return self._cursor()
525 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 296, in _cursor
526 self.ensure_connection()
527 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
528 return func(*args, **kwargs)
529 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
530 with self.wrap_database_errors:
531 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
532 raise dj_exc_value.with_traceback(traceback) from exc_value
533 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
534 self.connect()
535 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
536 return real_connect(self)
537 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
538 return func(*args, **kwargs)
539 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
540 self.connection = self.get_new_connection(conn_params)
541 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
542 connection = super().get_new_connection(conn_params)
543 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
544 return func(*args, **kwargs)
545 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
546 connection = self.pool.getconn()
547 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
548 raise PoolTimeout(
549django.db.utils.OperationalError: couldn't get a connection after 30.00 sec
5502024-08-16 20:59:04,407 - JO114A - MindlineCommonMiddleware - [DEBUG] Outgoing Response: 500 Internal Server Error
551Internal Server Error: /api/icbt/programs
552[16/Aug/2024 20:59:04] "GET /api/icbt/programs HTTP/1.1" 500 120
5532024-08-16 20:59:05,765 - DMFFGV - mindline.exceptions.exception_handler - [ERROR] Unknown Exception: couldn't get a connection after 30.00 sec
554Traceback (most recent call last):
555 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
556 self.connect()
557 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
558 return real_connect(self)
559 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
560 return func(*args, **kwargs)
561 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
562 self.connection = self.get_new_connection(conn_params)
563 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
564 connection = super().get_new_connection(conn_params)
565 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
566 return func(*args, **kwargs)
567 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
568 connection = self.pool.getconn()
569 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
570 raise PoolTimeout(
571psycopg_pool.PoolTimeout: couldn't get a connection after 30.00 sec
572
573The above exception was the direct cause of the following exception:
574
575Traceback (most recent call last):
576 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 497, in dispatch
577 self.initial(request, *args, **kwargs)
578 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 315, in sentry_patched_drf_initial
579 return old_drf_initial(self, request, *args, **kwargs)
580 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 414, in initial
581 self.perform_authentication(request)
582 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/views.py", line 324, in perform_authentication
583 request.user
584 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 231, in user
585 self._authenticate()
586 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/rest_framework/request.py", line 384, in _authenticate
587 user_auth_tuple = authenticator.authenticate(self)
588 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 30, in authenticate
589 return self.authenticate_credentials(request)
590 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_multi_token_manager.py", line 54, in authenticate_credentials
591 user = ELearningUserTokenManager().check_user(username, user_id)
592 File "/home/tharinda/work/mindline/mindline-backend/mindline/authentication/elearning_user_token_manager.py", line 104, in check_user
593 user_model = get_user_model().objects.using("default").filter(username=username, deleted=False).first()
594 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1097, in first
595 for obj in queryset[:1]:
596 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 400, in __iter__
597 self._fetch_all()
598 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1928, in _fetch_all
599 self._result_cache = list(self._iterable_class(self))
600 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 91, in __iter__
601 results = compiler.execute_sql(
602 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1572, in execute_sql
603 cursor = self.connection.cursor()
604 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
605 return func(*args, **kwargs)
606 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 320, in cursor
607 return self._cursor()
608 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 296, in _cursor
609 self.ensure_connection()
610 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
611 return func(*args, **kwargs)
612 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
613 with self.wrap_database_errors:
614 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
615 raise dj_exc_value.with_traceback(traceback) from exc_value
616 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
617 self.connect()
618 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/__init__.py", line 680, in connect
619 return real_connect(self)
620 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
621 return func(*args, **kwargs)
622 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
623 self.connection = self.get_new_connection(conn_params)
624 File "/home/tharinda/work/mindline/mindline-backend/mindline/db/backends/postgres_iam/base.py", line 22, in get_new_connection
625 connection = super().get_new_connection(conn_params)
626 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
627 return func(*args, **kwargs)
628 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 344, in get_new_connection
629 connection = self.pool.getconn()
630 File "/home/tharinda/work/mindline/mindline-backend/.venv/lib/python3.10/site-packages/psycopg_pool/pool.py", line 202, in getconn
631 raise PoolTimeout(
632django.db.utils.OperationalError: couldn't get a connection after 30.00 sec
6332024-08-16 20:59:05,771 - DMFFGV - MindlineCommonMiddleware - [DEBUG] Outgoing Response: 500 Internal Server Error
634Internal Server Error: /api/icbt/programs
635[16/Aug/2024 20:59:05] "GET /api/icbt/programs HTTP/1.1" 500 120
Back to Top