Image Size Plugin
-
What does this thing do? There is a ton of stuff in the logs like this:
{"level":"warn", "message":"[nodebb-plugin-image-size] timed out: \"https://cdn-enterprise.discourse.org/meta/user_avatar/meta.discourse.org/zogstrip/100/8630_1.png\"", "timestamp":"2016-11-08T17:25:05.362Z"}
And it seems like the forum...pauses...a lot when navigating around.
Paging @ben_lubar.
-
@boomzilla said in Image Size Plugin:
https://cdn-enterprise.discourse.org/meta/user_avatar/meta.discourse.org/zogstrip/100/8630_1.png
Damn it! That's the cootie vector, right there!
-
cdn-enterprise.discourse.org
timed out
Truly an enterprise-grade CDN.
-
@boomzilla said in Image Size Plugin:
What does this thing do?
It adds height and width attributes to images so that they don't jellypotato all over the place.
@boomzilla said in Image Size Plugin:
There is a ton of stuff in the logs like this:
{"level":"warn", "message":"[nodebb-plugin-image-size] timed out: \"https://cdn-enterprise.discourse.org/meta/user_avatar/meta.discourse.org/zogstrip/100/8630_1.png\"", "timestamp":"2016-11-08T17:25:05.362Z"}
Yeah, I have it set to log that stuff currently.
@boomzilla said in Image Size Plugin:
And it seems like the forum...pauses...a lot when navigating around.
The timeout for loading all the images in a post is currently 15 seconds. I can reduce that if you think that would be a good idea.
-
@ben_lubar said in Image Size Plugin:
The timeout for loading all the images in a post is currently 15 seconds. I can reduce that if you think that would be a good idea.
15s seems like a long time, especially when it's (apparently) holding up navigation. I'm not sure this is a feasible thing to be doing.
-
@boomzilla if you want, you can disable the plugin and do an instance restart.
-
@ben_lubar Done.
-
@ben_lubar said in Image Size Plugin:
The timeout for loading all the images in a post is currently 15 seconds. I can reduce that if you think that would be a good idea.
If it's involving the Discourse CDN, I would have thought increasing the timeout would be a more prudent idea. If you're expecting replies that is....
-
@PJH That was just a happy coincidence too funny not to copy. It was mostly other stuff from all over the place.
-
@boomzilla said in Image Size Plugin:
@PJH That was just a happy coincidence too funny not to copy. It was mostly other stuff from all over the place.
Wait, is it not caching timeout statuses so it doesn't keep requesting it? WTF?
-
@ben_lubar said in Image Size Plugin:
It adds height and width attributes to images so that they don't jellypotato all over the place.
Can we do that on bake instead? With maybe a job to do it -- ONCE -- per every existing post in the database?
-
@Yamikuronue said in Image Size Plugin:
Can we do that on bake instead?
Baking in NodeBB is cached in memory, not in the database.
-
@Tsaukpaetra said in Image Size Plugin:
Wait, is it not caching timeout statuses so it doesn't keep requesting it? WTF?
It caches the size of an image (failure is considered a 0x0 image) for 10 minutes in addition to the post cache, but if different IPs request the same post, they might get different NodeBB instance.
-
@ben_lubar on submit then. Edit the incoming post.
-
How about you set an initial timeout of 2 seconds, after which you bake without dimensions, but keep the connection open for another minute or so to rebake if the image comes in after all.