IRC logs for #farmOS, 2022-04-06 (GMT)

2022-04-05
2022-04-07
TimeNickMessage
[06:16:39]* gvlx has joined #farmos
[11:53:08]* gvlx has quit (Ping timeout: 252 seconds)
[12:58:15]* ludwa6[m] has joined #farmos
[12:58:16]<ludwa6[m]>Hey mstenta (and anybody else who is using Farmier hosting these days): since i (and paul121, 8 hours out of sync w/ me) has been running some resource-intensive requests and API scripts agains the server in recent days, i don't know if that's having any impact on server performance for others... If so, my apologies!
[12:59:03]<mstenta[m]>Hi ludwa6 I haven't seen any issues - have you?
[12:59:04]<ludwa6[m]>Fact is: i for one have been getting responses like "The website encountered an unexpected error. Please try again later." more than ever before.
[12:59:43]<mstenta[m]>Oh really? I will take a look
[13:01:36]<mstenta[m]>Is this happening in your browser? Or in your API scripts?
[13:01:54]<ludwa6[m]>Used to be once in a blue moon maybe... But now it seems like whenever i've been requesting a large list -more than the default 50 items. Might not be relevant, but that's what i remember: pulling big reports. For example (the last): https://vdl.farmos.net/quantities/standard?log_name=&label=&value_min=&v...
[13:02:05]<ludwa6[m]>In browser is when i've noticed.
[13:02:17]<mstenta[m]>That is a lot of items per page
[13:02:26]<mstenta[m]>You could very well be overdoing it with that many
[13:02:28]<ludwa6[m]>I've had failures with running scripts, but has often (maybe always) owing to problems with the data that we've been sorting out after many iterations.
[13:02:47]<ludwa6[m]>mstenta[m]: OK, i'll try to chunk requests a bit more granular.
[13:02:53]<mstenta[m]>That Quantity View is not a simple query - it has a lot of `JOIN`s to pull in the log data etc
[13:03:09]<mstenta[m]>Yea I would recommend making smaller requests and see if that helps
[13:03:38]<ludwa6[m]>mstenta[m]: ah, ok. hard to know what's going on under the sheets.
[13:03:46]<mstenta[m]>I do see some errors in your logs that are from the `apiTest` user - but they all appear to be related to the actual data being pushed malformed etc
[13:03:55]<mstenta[m]>from today
[13:04:21]<mstenta[m]>Feel free to let me know if/when you see things like this though - I can take a look
[13:04:38]<ludwa6[m]>Yea, that would be paul121 ; i've been operating as user 'walt'
[13:05:14]<ludwa6[m]>But these problems with the data that we are uploading from CSVs... Well, you never know what problems lie therein until you start fitting it to the db
[13:05:57]<mstenta[m]>Yea :-)
[13:06:20]* gvlx has joined #farmos
[13:06:39]<mstenta[m]>The API responses aren't always the most informative... the PHP logs can sometimes be more helpful. Those aren't visible to users (for security reasons), but if you're ever super stumped and want me to take a look let me know.
[13:07:44]<ludwa6[m]>Great, thanks -and if you can give any preemptive advice as to what actions might trigger an "expensive" join, do feel free to advise.
[13:09:08]<ludwa6[m]>FWIW: when i asked Paul if he was getting any such error messages, and he said yes sometimes... He went on to explain as follows, which might be helpful to you:
[13:09:09]<ludwa6[m]>" It seemed to clean itself up when it happened to me. Drupal tried to cache a lot of the responses, so my hunch is that the cache might be filling up with these long lists of logs"
[13:10:30]<ludwa6[m]>NB: we have been uploading sometimes >2k logs in a single script run
[13:10:33]<mstenta[m]>There aren't any easy rules-of-thumb regarding query complexity... each View in farmOS has a different query behind it, and complexity can depend greatly on what columns/filters are included.
[13:10:55]<mstenta[m]>But the pager will definitely have an impact. The more data the more expensive.
[13:11:02]<mstenta[m]>So that's an easy place to start at least. :-)
[13:11:20]<ludwa6[m]>mstenta[m]: 👍️
[13:11:44]* gvlx has quit (Ping timeout: 272 seconds)