1

I use a raspberry pi for hosting some webservice (like owncloud or gitlist). Recently I added tiny tiny rss, everythings is working fine except that apache wait 30 seconds to send the reply of php pages , I looked into top during page loading, its apache who eat cpu not php. And it only do that with ttrss (tiny tiny rss), owncloud is fine since I installed php-ac.

apache's access.log show nothing until the 30 seconds.

In the error.log, I have :

[Sun Mar 17 10:23:17 2013] [error] [client 192.168.0.12] PHP Strict Standards:  Declaration of SanitizeDummy::sanitize() should be compatible with SimplePie_Sanitize::sanitize($data, $type, $base = '') in /var/www/ttrss/include/functions.php on line 14, referer: http://pi.local/ttrss/index.php

Each times I load the index.php page but the error shows after the 30secs hangs (almost when everything is loaded).

It does that only for index.php and prefs.php (and only when a user is logged in , for the login page it's fast)

the ttrss page talk about php-ac , but i did not notice anything changed with it.

Is this a configuration issue? I don't think the error message have something to do with that but maybe I'm wrong

(I already asked on raspberrypi.stackexchange.com but they told me that I maybe have more chance here)

1 Answer 1

1

I am pretty sure that it happens because:

  • you configured tt-rss to update the feeds while you have the page open (SIMPLE_UPDATE_MODE parameter in config.php).
  • you have a bunch of feeds, and tt-rss is trying to update them on load and Apache times out, because your Raspberry lacks CPU power to do everything under 30 seconds and that's the PHP execution time limit.

If that's the case, I recommend you to do the following:

  • Change your configuration to:
    • 'SIMPLE_UPDATE_MODE', false
  • Run your feeds update in a cron job (I have this under Debian and www-data, adjust to your specific case):

    */15 * * * * cd /usr/share/tt-rss/www && /usr/bin/php update.php -feeds > /dev/null

I prefer to let out errors in order to catch problems. If you use the latest release (1.7.4 at the time of this writing) you will get the Sanitize error that you pasted in your question. It's related to the update.php script but otherwise is bogus; the patch to fix it is https://github.com/gothfox/Tiny-Tiny-RSS/commit/3fd035f5eb56c96b163d99503ae20f79691a4e75.

More about updating feeds in tt-rss: http://tt-rss.org/redmine/projects/tt-rss/wiki/UpdatingFeeds

Disclaimer: I don't like the update_daemon2.php approach because the process could die and no one would tell you, so you would need to run it through daemontools or something similar to make sure it's always up. Moreover, if you update the code, you'd need to stop it to reload the new code.

I hope it helps.

3
  • I just checked it , SIMPLE_UPDATE_MODE is already on false. I notice that happen only with the main desktop interface , with the ttrss/mobile page , it load fast as hell. I found that weird for the lack of power , because it can process page way more heavy than that. Is there a way to monitor where it hang ? . (for the update_daemon2.php , I made a watchdog script to be sure)
    – eephyne
    Commented Mar 24, 2013 at 10:32
  • So if you see that Apache is eating CPU, that's because you're using mod_php, an Apache module that executes PHP inside the web browser, not because the problem is in Apache. Are you using Debian?
    – Ender
    Commented Mar 26, 2013 at 8:23
  • yes it's based on debian. Can I debug the execution of the page to see whats take time ?
    – eephyne
    Commented Mar 26, 2013 at 9:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .