Comments (9)
Hi @hiranya911,
I just deployed a version of my App with your fix in order to test it.
I tried to read/write to Firebase, and it seems to work; but since the problem is not occurring regularly (I had a few timeouts today, while the last errors were returned on 05-06-09/09), I'll keep it checked in order to find any errors.
from firebase-admin-python.
@mvalota Can you share the exact stacktrace/error message you're seeing? The 5 second timeout is for internal RPC calls made by App Engine. URL Fetch calls have a 60 second timeout by default:
Making requests to external URLs using URLFetch can also produce DeadlineExceededErrors
if the target website is having performance issues or normally takes more than 60 seconds
to reply. The logged stack trace of the DeadlineExceededErrors should contain calls to the
URLFetch libraries in these cases.
I would like to know what is actually triggering the deadline exceeded error.
from firebase-admin-python.
Here's the stacktrace:
An error occurred during a request. (/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/main.py:94)
Traceback (most recent call last):
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/modules/directory_module.py", line 98, in get_groups
groups_array = firebase_module.get_groups()
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/modules/firebase_module.py", line 396, in get_groups
result_dict = ref.get()
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/firebase_admin/db.py", line 137, in get
return self._client.request('get', self._add_suffix())
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/firebase_admin/db.py", line 681, in request
resp = self._do_request(method, urlpath, **kwargs)
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/firebase_admin/db.py", line 716, in _do_request
resp = self._session.request(method, self._url + urlpath, **kwargs)
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/google/auth/transport/requests.py", line 179, in request
method, url, data=data, headers=request_headers, **kwargs)
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/requests/adapters.py", line 423, in send
timeout=timeout
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/requests_toolbelt/adapters/appengine.py", line 170, in urlopen
**response_kw)
File "/base/data/home/apps/s~project-name/20170901t114805.403796533333348168/lib/requests/packages/urllib3/contrib/appengine.py", line 152, in urlopen
raise TimeoutError(self, e)
TimeoutError: (<requests.packages.urllib3.contrib.appengine.AppEngineManager object at 0xfe3560f0>, DeadlineExceededError('Deadline exceeded while waiting for HTTP response from URL: https://project-name.firebaseio.com/groups.json',))
I received the last expected log at 12:32:56.773, while the error log was at 12:33:01.770 (~ 5 seconds later)
The lines that are causing this error are:
ref = db.reference('groups')
result_dict = ref.get()
But I had the same error on other requests to firebase db (get, update..)
from firebase-admin-python.
Thank you @mvalota. If I push a fix to a separate branch, can you try it out and provide some feedback?
from firebase-admin-python.
Sure, I can try it. Thank you @hiranya911
from firebase-admin-python.
@mvalota I have a fix in progress at #72. You can checkout the hkj-http-timeout
branch to give it a try. I suppose you can copy the code from that branch into you App Engine app, and take it for a spin.
from firebase-admin-python.
Hi @hiranya911,
I released your fix one week ago, and since that release my application never returned a DeadlineExceededError occurrence.
from firebase-admin-python.
@mvalota That's great news. I will get the fix merged into a release soon.
from firebase-admin-python.
This was released today: https://firebase.google.com/support/release-notes/admin/python#2.4.0
from firebase-admin-python.
Related Issues (20)
- [FR] - When using Email/Password authentication, add a way to login with the password HOT 2
- Transaction contextmanager does not set transaction to in_progress HOT 2
- python-jwt is deprecated HOT 2
- firebase_admin installed and got PyJWKClient issue HOT 2
- [FR] Download url like with node js client HOT 1
- Github Desktop Pull/Push Issue HOT 2
- [FR] Adding global var HOT 1
- Option to pass values to the transaction function callback HOT 1
- auth.verify_id_token throwing ValueError HOT 1
- [FR] Add Support for Pyodide by providing a wheel with binaries built for Emscripten. HOT 2
- [FR] Add WebApps support to project_management HOT 1
- Couldn't import app_check HOT 1
- Firebase functions container silently freezes on making a get request to Firestore if multiple requests were created before container starts HOT 3
- Call to Firestore getting timed out from the docker container. HOT 1
- Querying Firestore documents by nested key-value in an array field using Python HOT 1
- firestore times out when using default DNS resolver HOT 1
- [FR] Async `messaging` requests HOT 1
- import firebase admin HOT 3
- Using cloud run from gcp console to firebase HOT 1
- Cloud run from gcp console HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firebase-admin-python.