These are chat archives for WP-API/node-wpapi

16th
Jun 2016
Mark Anthony Cachia
@cachiama
Jun 16 2016 14:35
does anyone have a clue why only 1 request is served concurrently with the rest api? the requests to WP-REST seem to be queued on both MAMP locally and Apache with mpm_prefork. on apache the same process is used to serve queued requests rest requests.. wordpress pages including the admin are not effected, this behaviour is only encountered with the rest api
if I add a sleep of 10 seconds in get_items function and hit the request 3 times, the requests take 10, 20 and 30 seconds to complete respectively
K Adam White
@kadamwhite
Jun 16 2016 15:42
@cachiama That's interesting, I'm not sure I fully understand what's going on -- if this is an issue with the WP-API itself, I suggest asking over in the #core-restapi channel on the WordPress Slack: chat.wordpress.org
@Shelob9 Meant to tag you on review of kadamwhite/wordpress-rest-api#176 btw, would welcome your input if you have time to check out the discussion!
Mark Anthony Cachia
@cachiama
Jun 16 2016 15:44
basically whenever i call the rest-api, the same worker is being allocated
and if the worker is busy serving a previous rest api request, all following requests are being queued instead of being served by idle workers
K Adam White
@kadamwhite
Jun 16 2016 15:45
this is a worker on the node side, then, not within the PHP? trying to understand your system arch
If this is a node or JS issue, this is the place to discuss it; otherwise let's move over to the Slack channel and they'll be better positioned to assist
Mark Anthony Cachia
@cachiama
Jun 16 2016 15:48
it seems to be more of a worker issue, sure let me join the slack channel ASAP, thanks for your help!
K Adam White
@kadamwhite
Jun 16 2016 15:51
No problem, if you run into any bugs or have feedback on the JS client’s interface let me know!
Mark Anthony Cachia
@cachiama
Jun 16 2016 15:51
will do, thanks again :)
K Adam White
@kadamwhite
Jun 16 2016 15:51
We’ve got our energy back around development, what with WCEU, LoopConf and Day of REST coming up later this year
so, i have no excuses not to be working on it more :)
Mark Anthony Cachia
@cachiama
Jun 16 2016 15:55
that's great, looking forward to your future releases :)