Hi @jerry, since September 2, I am experiencing great lags when querying the public timeline of infosec
-
Hi @jerry, since September 2, I am experiencing great lags when querying the public timeline of infosec.exchange with Mastodon.py.
Requests sometimes take multiple seconds to finish. It seems, the API itself is responding quite fast (250ms) but the pre- / post-processing is sluggish. While this is none of your business, I wonder if you changed anything recently, which may be the cause for the issue. I‘d love to hear from you :3
-
Hi @jerry, since September 2, I am experiencing great lags when querying the public timeline of infosec.exchange with Mastodon.py.
Requests sometimes take multiple seconds to finish. It seems, the API itself is responding quite fast (250ms) but the pre- / post-processing is sluggish. While this is none of your business, I wonder if you changed anything recently, which may be the cause for the issue. I‘d love to hear from you :3
@kpwn nothing I’m aware of. The web front end and mobile apps use those same endpoints, so that’s a bit strange. What are you doing with mastodon.py so I can try to replicate?
-
@kpwn nothing I’m aware of. The web front end and mobile apps use those same endpoints, so that’s a bit strange. What are you doing with mastodon.py so I can try to replicate?
@jerry It basically comes down to this:
if __name__ == '__main__':
mastodon_main = Mastodon(api_base_url='https://infosec.exchange', access_token='[access_token]', request_timeout = 10)for i in range(20):
print(f'{i}...')
t = time.time()
posts = mastodon_main.timeline(timeline='public', limit=20)
print(f'{i} done in {time.time() - t}s')In my recent attempts, the request takes around 1 second, which is okay but still slower than I'd expect. Interestingly, without API key, it's 0.2s faster.
-
@jerry It basically comes down to this:
if __name__ == '__main__':
mastodon_main = Mastodon(api_base_url='https://infosec.exchange', access_token='[access_token]', request_timeout = 10)for i in range(20):
print(f'{i}...')
t = time.time()
posts = mastodon_main.timeline(timeline='public', limit=20)
print(f'{i} done in {time.time() - t}s')In my recent attempts, the request takes around 1 second, which is okay but still slower than I'd expect. Interestingly, without API key, it's 0.2s faster.
@kpwn try changing the endpoint url to crank.infosec.exchange and see if that makes a difference...
-
@kpwn try changing the endpoint url to crank.infosec.exchange and see if that makes a difference...
@jerry Nah, pretty much the same. Maybe even a little slower.
-
@jerry Nah, pretty much the same. Maybe even a little slower.
@kpwn ok - that helps me rule out Fastly. One change I did make, though on Sept 3 not 2 is enabling the new msatodon feature to fetch all replies. It seems unlikely to be related, but it's the only thing that changed in the past week or so.
-
@kpwn ok - that helps me rule out Fastly. One change I did make, though on Sept 3 not 2 is enabling the new msatodon feature to fetch all replies. It seems unlikely to be related, but it's the only thing that changed in the past week or so.
@kpwn I just reversed that change - can you try again?
-
@kpwn I just reversed that change - can you try again?
@jerry No noticable difference. Thanks for your support!
-
@jerry No noticable difference. Thanks for your support!
@jerry Also, the current response time of 1s is not that big of a problem. I had issues with responses that took up to 10 seconds or so. But if you did not change anything, the problem seems to lie somewhere else...
-