Loading complete messages for 100 threads

30 views
Skip to first unread message

Craig Brott

unread,
Aug 12, 2014, 2:51:10 AM8/12/14
to inbo...@googlegroups.com
I'm encountering the 500 internal server error because I'm bogging down the server with GET requests. Essentially what I'm trying to do is load the first 100 threads in a given inbox, loop through the threads and retrieve the body of each message in each thread (stored in an associative array with the thread id as the key and the message objects as the values). The only way I see to do that with the API is to use the thread id filter of messages: http:://127.0.0.1:5555/n/<namespace_id>/messages?thread=<thread_id> and loop through 100 GET requests in a PHP for loop, which is too fast for the API server to handle.

If this make sense, does anyone know of a better way to do this?

Thanks.

Eben Freeman

unread,
Aug 12, 2014, 3:17:39 AM8/12/14
to Craig Brott, inbo...@googlegroups.com
Hm, could you share the output from the API server logs? Ordinarily issuing /n/<ns_id>/messages?thread=<thread_id> as you specified would be the way to go.


--
You received this message because you are subscribed to the Google Groups "Inbox developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inbox-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages