Increasing the number of characters appears to have broken my mastodon instance

Well, this is fun. i followed directions in this article on increasig the character limit. Since I could not log in as user mastodon as “this user is not available” I figured I’ll do everything as root. Eerythign appeared to work, all files saved and looked correct, until it came time to rebuild using the ruby on rails command. The command the article gave was not found for what ever reason and now when I restarted the server and visit my mastodon instance I get a page saying “this URL is not correct.” I tried rebooting the yunohost server and the linode. I’ve not seen this before. I’m prepared to reinstall mastodon, however what might I do differently in this case to make sure I can successfully up the character limit to let’s say 1000 characters. If I do get the rebuild to work at least, that would be awesome. the URL did work before I changed what needed to be changed in the 3 files mentioned in the article referenced in this post. What can I try after I get out of work today?
Thanks for all of your help, all you guys are wonderful, and I learned a lot. I successfully set up some other apps on my own and for that, I feel proud.
thanks and have a happy wednesday.
btw if anyone wants to see the error you may go to my instance. Note that invites are closed as it’s a very very private instance so I will not be accepting any invites at least for now.
I also did check for updates to yunohost before attempting this so all was well there as far as I’m aware. Note I found an older topic. I logged as the mastodon using
su - -s /bin/bash mastodon as root and entered
RAILS_ENV=production bundle exec rails assets:precompile
I gotr the notificaiton that version 3.2 of ruby is not installed. I thought the yunohost platform already took care of that. does somethign need to change or do I need to check for updates again then try that command one more time? I get the feeling I’m very very close.
Am I missing a step somewhere? This is running on a linode running debian 11.x.

This is more a Support request and should have been put in that section of the forum. :wink: You would have been prompted for more details, especially logs.

I can only guess what happened: since root user built the app, the service cannot access the files.

Let’s try to repair this:

sudo su
chown mastodo:mastodon -R /var/www/mastodon
systemctl restart mastodon-sidekiq
systemctl reload mastodon-web
systemctl restart mastodon-streaming

If it is failing, share logs.


Hello. Happy thursday. I hope this finds you well.
first lease except my humble apologies. I was kind of afraid to post in the support category as I really was not sure where this thing belonged.
second the first command given failed with "this user does not exist which is odd as I was logged in via “mastodon” using the “su - -s /bin/bash mastodon” command a few minutes before I sent this reply.
I could not find a way to upload all of my logs so ran the diagnosis figuring that would do something it shows all of my apps are ok. There are some things way beyond my control that I cannot fix however since I"m not running email through my server per-say I’m not worried yet. here is the link to the log to the best of my ability. If this is the wrong log I can try again.
I can always nuke the instance as really there is not much on there but one account, mine, and almost no configurations.
thanks so much for the reply, your time and attention to the matter. Again, have a happy thursday.

1 Like

Hi ke7zum,

The information you posted is the output of the diagnostics. It is useful and has the information that tituspijean referred to. I’ll take the liberty of reposting the basics of your Yunohost here for the benefit of other readers:

Base system (basesystem)

[INFO] Server hardware architecture is kvm amd64
  - Server model is Linode Compute Instance
[INFO] Server is running Linux kernel 5.10.0-28-amd64
[INFO] Server is running Debian 11.9
[INFO] Server is running YunoHost (stable)
  - yunohost version: (stable)
  - yunohost-admin version: (stable)
  - moulinette version: 11.2 (stable)
  - ssowat version: 11.2 (stable)

To post a log from a previous action, go (in the admin interface) to “Tools” → “Logs” → select or search log → click “Share logs with YunoPaste”.
The share-action will remove IP addresses, user names, passwords, domain names and other personal information.

Did you copy the command verbatim? I notice a small omission in the command: the ‘n’ is missing in the username mastodon.

Before doing that, you could see if there already is a backup of the app (also via the admin interface, “Backup” → “Local archives” → xx days ago mastodon something (yy MB) → click restore


Happy thursday. Thanks so much. I’m beat after teaching 6 hours of class and participating in a class for 2 hours before my shift. I will take a look with a fresh mind. I will though keep the post for later reference and for future troubleshooting steps. And who knows, someone else might have this issue as well and have weird breakage.
first, the back up I wanted does not exist anymore. I found one that I thought was going to work except thet app was already installed, and that was not mastodon.
Second the the logs I don’t think would have helped. I see stuff from yesterday. the only log I can provide was when mastodon was installed not when I made the changes to the nano file, I mean the file via nano. Sorry. Maybe teaching for 8 hours was not such a good idea. lol!
I do have the log in case anyone needs it. If not, please disregard.

thanks so much everyone, and have a happy thursday. I will get this solved. Take your time in looking at the logs. I’m in no rush.
Thanks again.

Can you also share the logs of the Mastodon services? They are in the Tools > Logs menu.

Thanks. All I could find was this log regarding the install of mastodon.
Is that the one you wanted, as that is the only one I could find, the rest are having to do when I installed the let’s encrypt certificate, creating an archive backup when I upgraded one of my other apps which was 2 days ago, and about 19 hours ago at the time of this writing when some configurations were rewritten. I can’t remember why now, this was after my crunch crash [tech term] with mastodon.
Thanks everyone. Let’s hope this is just something I fat fingered which could also be the case. If it is not, when let’s hope what ever happeend can be fixed for the next user to install.

Thanks for your happy wishes, I extended them to Friday :slight_smile:

I’d say teaching is always a good idea :smiley:

Do I understand correctly that, in the end, you were not able to continue the troubleshoot or resolve the problem?

According to the catalog, the version currently shipped with Yunohost is 4.2.8, which is also the current version in git. If you installed not so long ago, I expect that to be your version.

I found a blog post that describes what it would involve to change this character limit. It seems that two files need to be edited,

If the guide you followed suggested changing the same files, and if you messed up anything, it is just those two files, you can replace them with a fresh copy using the links to Github above.

Because of the security model of Yunohost it can be a bit of a hassle to get the files in the right directory. Thinking about it, and remembering …

… that could have worked in you disadvantage. Maybe some files you edited as root are not accessible anymore for the Mastodon-user.

I haven’t used Mastodon, so I’m not sure which user is created on Yunohost to run the service. Let’s stick with mastodon. What I usually do in such cases:

$ ssh wbk@domain.tld
wbk@domain.tld:~$ sudo su - # to swith to root
root@domain.tld:~# sudo -u mastodon the_command_I_want_to_run  # to run the command in the context of that user

Back to your files. Mastodon is not a small application, plenty of things that might have gone awry.

To get on the same page, could you share the guide that you followed?

PS, happy weekend :slight_smile:

I’m sorry, I was not quite awake… the services logs are in Tools > Services.

1 Like

Looks like the reply to email function broke as my posts never sent. woops?
Ok, I got the oroginal instructions from this article link per my original post. and those are the two files I changed. or was it 3. I think it was 3 according to the original article. here are the logs you guys wanted.

  • first is the mastodon streaming service log.
  • Next is the mastodon web log.
  • finally is the mastodon sidekiq services. I think I spelled that wrong actually. Sorry.
    Have a happy Sunday all. And again sorry for the slow reply. I had assumed the reply to email function of the forum worked. I should have checked rather than assumed. I tell my students this all the time and, look what I did!
    Thanks all for your support.
    to the original poster who accidently gave me the wrong log path, don’t ’ worry about it. I make mistakes all the time, we are all human.

Thanks to all.

Oh, that’s annoying. It looks like that should work.

I totally overlooked it :stuck_out_tongue:

The article at edits the same two files to change the file limit as does the blog at .

Besides that, it adds a new attribute definition. The only reference to the attribute ‘max_post_chars’ seems to be a suggestion to add it to Mastodon. As such, I think you can omit that change for now.

They look quite useless :frowning: It seems they start out of the blue with the bottom half of an error trace, missing the actual location where the error occurred.

Now what to do?

  • Can you find your way around the filesystem with cd, ls and friends? If so:
    • cd to the directories containing the changed files
    • ls -alrt to list files with newest changes at the bottom
    • cp the files (one by one, sorry) to keep a copy of your changes, so you can check/compare what changed/went wrong
    • find the files that you changed on Github, download a fresh copy and overwrite the contents of your installation
    • assuming those were the only changes, your Mastodon should run again after rebuilding
  • If not, and your mastodon has not yet seen a lot of use
    • maybe throw in the towel, and remove/reinstall :frowning:

Don’t feel bad about assuming or about your manual reply only turning up later… I don’t think any one of us postponed their weekend activities waiting :wink:

Well, this gets curiouser and curiouser.
I tried again and rebuilt or tried to rebuild the service. Igot the following
rbenv: version `3.2.3’ is not installed (set by /var/www/mastodon/live/.ruby-version)
I think somethign bored during the install, or something. I appoligize if the logs did not help. Maybe something corrupted there as well. I thought I saw an all clear as I was able to open the mastodon instance bfore i made the change. I’m the only one on that instance and there really was no activity besides me just changing some settings. This is going to be an instance where no one but me is aloud, but I will federate to the public. that’s about all I know at this point in time. I might just try the extream chop off the head approach as there was no editional activity before I broke it, thank goodness.

I appreciate all you all taking the time to help where needed and when able. I will get this solved! I do not give up that easily. This is actually kind of fun.

Happy sunday to all.

I did reinstall and it is so far fixed! Here is how.

I edited those two files in the blog post referenced earlier. Ran into a snag when rebuilding as ruby 3.2.3 is not installed. 3.2.2 was and 4.2 version of mastodon does not like that. I ran

RUBY_CONFIGURE_OPTS=–with-jemalloc rbenv install 3.2.3

rbenv global 3.2.3

Then I updated my bundle things as it did not like what it saw, then I rebuilt mastodon, restarted the services, and away I went. I am not sure why 3.2.3 is not installed with mastodon version 4.2.2 but there it is.

1 Like


Nice to read you brought it to a happy end :slight_smile:

If you got the time, you might consider marking your last post as the solution. That way other readers may easily solve their problem if they run into the same symptoms.