[horde] Excessive Weather API calls
Simon Wilson
simon at simonandkate.net
Tue Jun 25 11:50:32 UTC 2013
>>>> I was using wunderground for weather information on the Horde
>>>> portal, but kept getting pinged by them for excess usage (over
>>>> 500 calls per day). We tried resetting the API key in case it had
>>>> been compromised, but that did not reduce the calls, so it was my
>>>> Horde system that was calling it. This was during a period when
>>>> we were all away and no-one was actually logged into the system
>>>> at all - other than via AS connections.
>>>>
>>>> As I was running out of raindrops (their credit system for
>>>> over-use) I swapped today to use worldweatheronline, registering
>>>> for a key. In just over 6 hours, almost 300 calls have been made.
>>>> This is despite the fact that I only had the Horde portal open
>>>> when I was testing it... and even then it is set to refresh once
>>>> per hour only. I might have called it 5 or 6 times whilst testing
>>>> it.
>>>>
>>>> Something appears to be triggering weather API calls on a far
>>>> more regular basis than should be the case...
>>>>
>>>> free v1 search.ashx 275 (98%)
>>>> free v1 weather.ashx 5 (2%)
>>>>
>>>> The only thing that happens that regularly on my Horde system is
>>>> AS activity...
>>>>
>>>> Any ideas?
>>>>
>>>> Simon
>>>>
>>>> --
>>>> Simon Wilson
>>>> M: 0400 12 11 16
>>>
>>> Besides that those calls should theoretically be cached, any
>>> chance that you have the weather forecast included in your calendar?
>>
>> Provided that you have one. Could it be you have no
>> $conf[cache][driver] configured? Using Weather Underground without
>> one will quickly exceed the volumes for free accounts.
>
> Thanks Jan and Arjen.
>
> Weather is not included in calendar.
>
> Caching was disabled when I was having issues with APC a couple of
> weeks ago - probably about the time I started getting the warnings
> actually. There has been so much change recently with updates, bug
> fixes, it's hard to keep track of it all sometimes!
>
> It's not been noticeably slower without the caching, so I didn't
> worry about re-enabling it. Is $conf[weather][params][lifetime]
> dependent on a $conf[cache][driver] being set?
>
> What dependencies are required for a Distributed Hash Table server -
> just Horde_HashTable?
>
> Thanks
> Simon.
>
I installed redis from EPEL repo, configured it (not much to that
really), installed pear nrk/Predis, then setup
$conf[hashtable][driver] Horde Distributed Hash Table to use localhost
Redis Server, then set $conf[cache][driver] Horde Caching to use a
Distributed Hash Table server, and $conf[cache][use_memorycache] to
Hashtable.
Is that all how it should be for Hash Table / Redis usage?
Test.php probably needs updating for redis / hash table support...
Anyway, with all of that done, the Horde system does seem marginally
quicker with it all cached, and my weather calls have dropped to
manageable levels.
Thanks
Simon.
--
Simon Wilson
M: 0400 12 11 16
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 1339 bytes
Desc: PGP Public Key
URL: <http://lists.horde.org/archives/horde/attachments/20130625/2c77e9c0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: PGP Digital Signature
URL: <http://lists.horde.org/archives/horde/attachments/20130625/2c77e9c0/attachment-0001.bin>
More information about the horde
mailing list