Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Way too many GET requests to the Micropub endpoint #85

Closed
hacdias opened this issue Nov 11, 2021 · 5 comments · Fixed by #87
Closed

Way too many GET requests to the Micropub endpoint #85

hacdias opened this issue Nov 11, 2021 · 5 comments · Fixed by #87

Comments

@hacdias
Copy link
Contributor

hacdias commented Nov 11, 2021

Every time I do anything, Micropublish.net makes dozens of GET requests to my Micropub endpoint, until one returns 404 and then it proceeds normally. I'm not sure if this is an issue on my implementation or not.

If I open Micropublish.net, click on "Note", it happens. Quill and others do not have this behaviour.

This is the list of requests:

/micropub?q=config
/micropub?q=config
/micropub?q=config
/micropub?q=config
/micropub?q=config
/micropub?q=config
/micropub?q=config
/micropub?q=config
/micropub?q=syndicate-to&post-type=note
/micropub?q=channel
/micropub?q=config
@jamietanna
Copy link
Collaborator

At least one of these queries will be to check what post types to display on the homepage.

At least one or two of these will then be checking what properties your post types support, so Micropublish can show all the properties that are relevant to edit.

It used to be that q=config was cached in Micropublish's session state, but the size of the q=config was starting to get quite large (across many peoples' implementations) so I believe we removed that, hence the multiple hits.

That being said, I think Barry should be able to see if there's anything else in there

@hacdias
Copy link
Contributor Author

hacdias commented Nov 12, 2021

I would expect only one call for /micropub?q=config. There's 9 for the same page request. Maybe the data could be passed along in the code somehow.

@barryf
Copy link
Owner

barryf commented Nov 12, 2021

Hmm, that's a bit too noisy. Jamie's right: config was getting too large to be stored in a cookie (#76) so Micropublish requests this from your endpoint when it needs it, but this is probably excessive.

My alternative approach was to use something like Redis to cache the config response. I'll raise an issue and link it here.

This was referenced Nov 12, 2021
@barryf
Copy link
Owner

barryf commented Nov 20, 2021

@hacdias Did you see this issue was fixed? It should mean there are many fewer requests to your server.

@hacdias
Copy link
Contributor Author

hacdias commented Nov 21, 2021

@barryf it is much better, indeed! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants