Forum

Tiny Tiny RSS: access speed via API extremly slow

Stefan
2 April 2015, 00:18
Hello. I have a problem with a Tiny Tiny RSS / Hiawatha installation. Access speed via http is fast. But via API (https://tt-rss.org/redmine/projects/tt-rss/wiki/JsonApiReference) it is extremely slow. I tried the same with nginx --> access speed via API is fast as http. Does anyone have any idea why this might be?
Stefan
2 April 2015, 22:19
Maybe this is helpful? access.log while access via API:

192.168.1.254|Thu 02 Apr 2015 21:47:29 +0200|200|477||POST /api/ HTTP/1.1|Accept: application/json|Content-Length: 52|Accept-Encoding: identity|Content-Type: application/json; charset=UTF-8|User-Agent: NativeHost|Host: xxx.xxx.xx|Connection: keep-alive|Cache-Control: no-cache
192.168.1.254|Thu 02 Apr 2015 21:47:29 +0200|200|477||POST /api/ HTTP/1.1|Accept: application/json|Content-Length: 52|Accept-Encoding: identity|Content-Type: application/json; charset=UTF-8|User-Agent: NativeHost|Host: xxx.xxx.xx|Connection: keep-alive|Cache-Control: no-cache
192.168.1.254|Thu 02 Apr 2015 21:48:00 +0200|200|511||POST /api/ HTTP/1.1|Accept: application/json|Content-Length: 53|Accept-Encoding: identity|Content-Type: application/json; charset=UTF-8|User-Agent: NativeHost|Host: xxx.xxx.xx|Connection: keep-alive|Cache-Control: no-cache
192.168.1.254|Thu 02 Apr 2015 21:48:00 +0200|200|511||POST /api/ HTTP/1.1|Accept: application/json|Content-Length: 53|Accept-Encoding: identity|Content-Type: application/json; charset=UTF-8|User-Agent: NativeHost|Host: xxx.xxx.xx|Connection: keep-alive|Cache-Control: no-cache
192.168.1.254|Thu 02 Apr 2015 21:48:31 +0200|200|2155||POST /api/ HTTP/1.1|Accept: application/json|Content-Length: 55|Accept-Encoding: identity|Content-Type: application/json; charset=UTF-8|User-Agent: NativeHost|Host: xxx.xxx.xx|Connection: keep-alive|Cache-Control: no-cache
192.168.1.254|Thu 02 Apr 2015 21:49:03 +0200|200|2155||POST /api/ HTTP/1.1|Accept: application/json|Content-Length: 55|Accept-Encoding: identity|Content-Type: application/json; charset=UTF-8|User-Agent: NativeHost|Host: xxx.xxx.xx|Connection: keep-alive|Cache-Control: no-cache
192.168.1.254|Thu 02 Apr 2015 21:49:34 +0200|200|4072||POST /api/ HTTP/1.1|Accept: application/json|Content-Length: 84|Accept-Encoding: identity|Content-Type: application/json; charset=UTF-8|User-Agent: NativeHost|Host: xxx.xxx.xx|Connection: keep-alive|Cache-Control: no-cache
192.168.1.254|Thu 02 Apr 2015 21:50:05 +0200|200|929||POST /api/ HTTP/1.1|Accept: application/json|Content-Length: 120|Accept-Encoding: identity|Content-Type: application/json; charset=UTF-8|User-Agent: NativeHost|Host: xxx.xxx.xx|Connection: keep-alive|Cache-Control: no-cache
192.168.1.254|Thu 02 Apr 2015 21:50:36 +0200|404|850||GET /feed-icons/13.ico HTTP/1.1|Accept: */*|Accept-Language: de-CH|UA-CPU: ARM|Accept-Encoding: gzip, deflate|User-Agent: Mozilla/5.0 (Windows Phone 8.1; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 1520) like Gecko|Host: xxx.xxx.xx|Connection: keep-alive


error.log is clean.
Hugo Leisink
4 April 2015, 08:35
I have no idea. It must be an application internal issue. You better consult the author of Tiny Tiny RSS.
Stefan
4 April 2015, 12:47
Hello Hugo, thanks for your feedback. I will ask in the tt-rss forum.
Regards, Stefan
Stefan
10 April 2015, 22:08
Hello Hugo

No chance to get help in the TT-RSS forum. May I ask you to look at the problem a little closer?
I've done a few more tests. No matter which PHP backend, CGI or FastCGI, Hiawatha current version or an older (included in Puppy Linux): there is always a delay of about 30 seconds until the download is complete (answer from the API call). Could that have a similar cause like here [www.hiawatha-webserver.org]?
In fact, the problem only occurs with Hiawatha. With nginx (with the same PHP backend) and Apache (Ubuntu LAMP) the problem does not occur.

Regards, Stefan
Hugo Leisink
12 April 2015, 08:29
I've seen your post at the TT-RSS forum. This fox dude is an immature loser if you ask me. I'll take a look at it within a few days, just need to find some time. I'll get back to you when I have.
Hugo Leisink
12 April 2015, 19:58
The problem is caused by the header() call at line 71 in api/index.php. Hiawatha incorrectly sees this as a "Content-Length" header. Comment that line as a work-around. It will be fixed in the next Hiawatha release.
Stefan
13 April 2015, 21:39
Hugo, you're faster than light! The workaround is working fine. Thank you very much for your time. And on this occasion I would like to thank for your wonderful Hiawatha.
Regards, Stefan
Hugo Leisink
13 April 2015, 21:41
You're welcome!
This topic has been closed.