How to avoid plugin "warm-up" period? Any tricks?

Hello,

I am calling the plugin every 15 seconds from a cron job but that does not help. Is there a way to avoid that? Sometimes the first request might take 30 seconds!!! Which is too long.

Regards

This is actually a very interesting topic. I think something in your app is screwed up though… 30 seconds isn’t right.

I have an SQL connector which either takes 1.7s or 0.6seconds, depending on if it’s warmed up or not. I tried (not hard) to create a keepalive method, and I thought it was working, but then didn’t. I will likely try again, but if anyone has any info on this, that would be great to read.

@troy.roberge Wooow Interesting. My plugin is returning a JSON of things. After the 1st time, it takes less than 1 second! So, it can’t be my plugin code.

But it is interesting to know that you never experience such delay. Maybe my use case?

Well if you wrote the plugin, how about skip the plugin and code it into the site to see what happens. I mean JSON is just text. I would try that.

Or give a lot more info here and see if we can shortcut the plugin with other options.

@troy.roberge Great suggestion! I will hardcode the JSON string and returns it to see if the response time is less than 1 second.

I am wondering why the same code takes less than 1 second after the 1st call. Weird!

This topic was automatically closed after 70 days. New replies are no longer allowed.