I also face similar issues, with apps such as WordPress or Shaarli, which sometimes stop responding to requests, yet do not crash but appear unhealthy to Cloudron or to any monitoring tool. It become annoying to need to restart apps manually several times a week, to the point I had to script something to fix the missing monitoring / autorestart for the more fragile apps running on Cloudron. As discussed in some thread in Cloudron forum this kind of healthcheck must be part of the Cloudron platform ideally. See -> https://forum.cloudron.io/post/101225 for the thread I mentioned and the mitigation (script) I'm using.
SansGuidon
Posts
-
Shouldn't we get an alert when a service container fails / is unhealthy?about 14 hours ago -
App crashing frequently throws "500" error - PHP Fatal error: Allowed memory size of 134217728 bytes exhausted8 days ago@girish As mentioned before, Shaarli hardcodes the memory limit in their init.php. I did not realize that Shaarli maintainer wasn't aware of that. Yet they suggest adjusting the way Cloudron packages Shaarli. https://github.com/shaarli/Shaarli/issues/2130#issuecomment-2726974132
Quoting the GitHub discussion:
@nodisc said in App frequently returns 500 error - PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (cloudron) #2130@SansGuidon wow, I had no idea this was actually in the code (and always has been), and on my setup (apache+php-fpm) it doesn't have any effect (memory_limit stays at 256M), but I suspect it does with Cloudron's setup which still uses the deprecated apache2+mod_php setup.
Before moving forward, I suggest that cloudron's packaging should be modernized to use php-fpm + apache mpm-event which has many advantagesThey suggest that we verify this by hacking the init.php of Shaarli and remove the ini_set but I can't do that as init.php is part of
/app/code
and I do not want to break Shaarli on my CloudronAny idea to move this forward?
-
Anyone added a custom app to their cloudron?19 days agoI did once for my own app, giving examples is maybe not worth it as every app is its own beast. However I used LLM Prompt for such task.
After I came up with a basic Dockerfile and script (shell) for building/running my app, I created a giant prompt including all the key config files for my app, including also a copy of the whole relevant documentations from Cloudron for packaging any app, as well as some examples of already packaged Cloudron app with same tech (there are a few https://git.cloudron.io/cloudron/)Based on that, I could already have a very good starting point
My prompt was something like :
I have a Pythonic app for Cloudron, called <NAME> I'd like to package it for my Cloudron, I've already a Cloudron Docker registry. Here is my <config/something.conf> file <CODE HERE> Here is my requirements.txt file listing all my app dependencies <REQUIREMENTS.TXT CONTENT HERE> Here is my Dockerfile <DOCKERFILE CONTENT HERE> Here is my docker-compose file <DOCKER-COMPOSE CONTENT HERE> Here are examples of CloudronManifest.json for python apps: <INSERT EXAMPLE 1 HERE> <INSERT EXAMPLE 2 HERE> <INSERT EXAMPLE 3 HERE> ... Also the official cheatsheet for packaging apps in general for Cloudron <COPY CONTENT FROM https://docs.cloudron.io/packaging/cheat-sheet/ HERE> Another tutorial for packaging is : <COPY CONTENT FROM https://docs.cloudron.io/packaging/tutorial/ here, excluding the "Next steps" section at the end > Here are examples of start.sh scripts from other Python apps: <INSERT EXAMPLE 1 HERE> And <INSERT EXAMPLE 2 HERE> Now if you need more files examples from some python app, let me know which could help and I provide them. other stuff like start.sh? Please STOP and ask first for all the files you need to know before giving the full step by step guide to package my app. I'm interested into Cloudron addons, which one could fit my app for now?
Then the LLM asked me for more info, I filled the info, then I did lot of progress around packaging my app. It is far from being perfect, but if you are not wanting to waste time coding, at least be efficient while being lazy
-
App crashing frequently throws "500" error - PHP Fatal error: Allowed memory size of 134217728 bytes exhausted20 days agoSo far, no crash during the night
. I'm now testing if lowering the memory allocated to this app by Cloudron will make things worse. Like going back to something like 256M instead of 1G.
-
App crashing frequently throws "500" error - PHP Fatal error: Allowed memory size of 134217728 bytes exhausted20 days ago@girish thanks for the package update, it might have improved the stability as despite sress testing the shaarli app after updating I didn't face the same error as before. I consider that if this resolves the problem it is a big victory, yet I prefer to not jump to conclusions for now, a good night is needed it the problem is not solved, I should soon get new alerts. Otherwise then I'll mark the issue as solved (hopefully)
-
App crashing frequently throws "500" error - PHP Fatal error: Allowed memory size of 134217728 bytes exhausted21 days agoThank you @girish
I've already pushed the memory limit up to 1G yesterday without help
What I did try is to edit php.ini with something likedisable_functions = ini_set auto_prepend_file = /app/data/init.php
and the
init.php
was a custom hack looking like<?php $original_ini_set = 'ini_set'; function ini_set($option, $value) { if ($option === 'memory_limit') { return false; } return call_user_func_array($GLOBALS['original_ini_set'], func_get_args()); } call_user_func($original_ini_set, 'memory_limit', '512M'); error_log("Prepend file loaded and memory_limit set to " . ini_get('memory_limit'));
I don't recall all the different versions of the setting I've tried as it was passed midnight but at some point I could work around the hardcoded memory limit of 128M as defined in Shaarli init.php. Yet that didn't solve the root cause
but even if I could see an effective increase of memory limit used by Shaarli at runtime, so completely ignoring what was hardcoded in init.php , that didn't improve the situation
-
App crashing frequently throws "500" error - PHP Fatal error: Allowed memory size of 134217728 bytes exhausted21 days agomy Shaarli app on Cloudron frequently throws 500 while loading the frontend.
everytime this occurs I see this in Shaarli log:Mar 04 14:40:58 [Tue Mar 04 13:40:58.352043 2025] [php:error] [pid 46] [client 172.18.0.1:36306] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 9235624 bytes) in /app/code/application/bookmark/BookmarkIO.php on line 93
I tried to increase the memory limit via Cloudron allocated resources and php.ini without improvement.
I've also opened an issue in Shaarli repo: https://github.com/shaarli/Shaarli/issues/2130 because this I/O intensive operation for loading such a small DB (9K links) is unbelievable.
I know CLoudron hardcodes this memory limit : https://git.cloudron.io/packages/shaarli-app/-/blob/master/Dockerfile?ref_type=heads#L31 so I first thought that my changes made to php.ini were not taken into account. I wonder also how to double check if those are really taken into account?Yet I also notice that Shaarli codebase contains a init.php file that hardcodes the memory limit to 128M : https://github.com/shaarli/Shaarli/blob/master/init.php#L18 so I also wonder if Cloudron php.ini makes sense.
Thanks for your help!
-
Cannot add Hetzner Storage Box via sshfs23 days agoI also used a passphrase the first time I had to setup hetzner storage via sshfs, for me it's a best practice so I always put a passphrase.
-
Is there a permalink for filtering apps with certain tags?Feb 19, 2025, 3:09 PMthank you @joseph
-
Request - show full changelog for CalibreWeb upgradesFeb 19, 2025, 12:51 PMthanks for clarifying, now I'm less confused
!
-
Is there a permalink for filtering apps with certain tags?Feb 19, 2025, 9:56 AMevery day I'm opening my Cloudron dashboard and filtering all apps with a specific tag.
I'd like to avoid the manual filtering of apps associated with specific tags, for instance I would like a permalink with the tags as query parameters at the end of the apps URL, something like : https://my.cloudron.domain/#/apps?tags=cron,dailycheckDoes such thing exist or is it possible to implement it? I can alternatively make some user script for this as a workaround, but I'd like to get this kind of feature out of the box.
Thanks in advance
-
Request - show full changelog for CalibreWeb upgradesFeb 18, 2025, 3:21 PMThe notification links to full changelog at https://github.com/janeczku/calibre-web/releases/tag/0.6.24 which contains
New features: Extract metadata of audiofiles during upload (mp3, opus, ogg, ogv, aac, ac3, aiff, asf, flac, m4a, m4b) Updated Pdf Viewer (pdf.js) Upload (multiple) book formats with progress and merge the corresponding metadata into the book on book edit page (also via drag'n drop #2252) Add cookie prefix environment variable to config to enable storing user credentials for multiple indstances on one server Implementation of sorting according to shelf added (#3003) Improved contrast for epub reader headline in dark modes (#3145) Enable python3.12 compatability (Migrate from iso639) Integrate the advocate project to simlify installations on newer python version (>3.9) on windows Set number of decimals of series_index shown everywhere to 2 digits Changed response code to opds download forbidden to 401 instead of 404 for opds downloads (improves anonymous browsing with guest has no download permission) libmagic binary files are now installed automatically on windows to simplify installation on windows Bug Fixes: Changed formating of float values. If value ends not with "0" tailing "0" are printed Fix for Kobo browser not downloading kepub files (#2990) Fix for cover size during kobo sync (#2523) Improved whitespace removal at start and end of strings for "unicode whitespaces" Shelf sort algorithm is now saved Music icon is now only visible once if more than one audio format available Fix for only last e-mail address is saved when specifying multiple e-reader mail addresses in user settings (#3130) Fix to generate thumbnails on gdrive Fix for metadata search results with amazon and google returning nothing Fix invalid database can not be saved for split library (#3131) Fix for Invalid cross-device link error during upload on very very(?) special drive configuration Fix Invalid amazon link for uk amazon store (#3151) Fix bookmarks button for safari browser (#3178) Fix Embedding metadata during convert not working on windows Fix Calibre convert parameters with spaces are not working (#3189) Import LDAP users from Microsoft Active Directory with special characters like "," and "[" is now working (#3186) Display error message if visiblity resticting custom column is not available and delete custom column related values on database change (#3190)
that's what I expect to see in the notification
-
Request - show full changelog for CalibreWeb upgradesFeb 18, 2025, 9:44 AMFor most app upgrades installed on my instance, the full changelog is shown in the notifications tab, but not for Calibre-Web.
Is it possible to fetch the full changelog and include it in the notification area as for other apps?
-
Obsidian LiveSyncFeb 17, 2025, 7:34 AM@necrevistonnezr I don't have iOS so I can only forward to https://www.macobserver.com/tips/how-to/how-to-use-syncthing-ios/
as a complement to your link, hopefully there is a way. I should give that a try. -
Obsidian LiveSyncFeb 16, 2025, 9:00 AMYou can backup to a private cloud with Obsidian Git plugin or Syncthing (not a plugin, but available on any machine and even on Cloudron) already
, I do it for years and because I also sync many other things with Syncthing, I feel I do not need a specific app for Obsidian sync. Just Syncthing works well for tons of stuff like even replace Dropbox to sync GBs worth of Video/Pics/Music/Docs..., etc.
Once you give Syncthing (which is free) a try, you won't need much of any other sync app -
Reboot Required - NotificationFeb 6, 2025, 6:54 PM@joseph said in Reboot Required - Notification:
Note that the notification does not disappear. It simply becomes unread. I guess you are expecting the notification to be hidden/invisible after a reboot?
Yes as the notification contains an action and as long as the notification and call to action remain active and visible I assume the reboot procedure has failed to be acknowledged by Cloudron.
I would expect the reboot action to be disabled after reboot is done - clearer for me. Mark read/unread is not enough it doesn't tell me the reboot and security patches are applied.
-
Notification settings - App is online?Feb 5, 2025, 1:48 PM@joseph : for now I'm using a cron job (code below) and Cloudron API to check every 10 min which app is down and restart it, is it possible to mimic some basic autoRestart as part of Cloudron platform instead?
That would be nice to free ourselves from maintaining scripts like below even if I truly love scripting and fixing problems myself#!/bin/bash API_TOKEN="<REDACTED>" CLOUDRON_URL=${CLOUDRON_WEBADMIN_ORIGIN} APPS="<APP_ID> <APPNAME.MYDOMAINE.TLD> <ANOTHER_APP_ID> <APPNAME.MYDOMAINE.TLD>" echo "$APPS" | while read id url; do status1=$(curl --max-time 15 -s -o /dev/null -w "%{http_code}" "https://$url") status2=$(curl --max-time 15 -s -o /dev/null -w "%{http_code}" "https://$url") if [ "$status1" -ne 200 ] && [ "$status2" -ne 200 ]; then curl --max-time 5 -s -X POST "$CLOUDRON_URL/api/v1/apps/$id/restart" -H "Authorization: Bearer $API_TOKEN" \ && echo "$url restarted ✅" \ && php /app/data/scripts/send_email.php <EMAIL> "Cloudron Healtcheck" "Service at $url was automatically restarted!" fi done
-
Notification settings - App is online?Feb 5, 2025, 12:02 PMI wonder in which case the app is going back online? My experience has been that either we had to restart an app, either an app crashed, but then we have to manually trigger a restart.
Did I miss other use cases? I'm still scripting a restart of crashed apps every 10 min like for WordPress, Shaarli, which seem to be taken down regularly by indexing bots, I know it was planned to automatically restart apps on demand in Cloudron settings, but I doubt it is already implemented and hence I also wonder in which case the "App is online" notification would be really helpful. Maybe for shared Cloudron instances managed by several users/admins? -
Shaarli app crashing constantly due to indexing bots (Yandex & co)Feb 4, 2025, 6:02 PM@fbartels in that case that's good as it's the option I've already tried as mentioned at the end of original post. It took me a while to find about it's existence though because it's the first time I had to face such an spam on my instance, usually blocking user agents was enough
-
Shaarli app crashing constantly due to indexing bots (Yandex & co)Feb 4, 2025, 5:15 PM@joseph thanks! how to make use of the linked change for my shaarli instance? I'm not fully grasping how they relate.
Regarding CF I'd prefer to avoid them, I'll never give them credit nor let their bloated modern firewall interfer with my stuff. They already ruin the web enough. So I prefer blocking by IP I guess....