UnArchive channel delay

Hi,
i’m working in mode where i should archive and un-archive channels.
i found that archiving and immediately un-archiving behave not as expected,
i guess there is some delay of the archive process. i did not found any documentation about it.
does someone have an idea?
thanks in advance

Thanks @nina.utkin for the question!

How long of a delay are you experiencing? And are you using the command line, or the APIs, to archive and unarchive channels?

@ jasonblais thanks,
finally, i found out that the delay is during unarchive process, and usually it is around 30-35 min.
the channel is visible immediately, but any message is not sent during first 30-35 min …

Thanks @nina.utkin,

Are you using the command line or the APIs to archive and unarchive channels?

o, thanks lindy65, i am using APIs,

Thanks @nina.utkin - to confirm, does this describe the steps that reproduces the issue?

  1. Use https://api.mattermost.com/#tag/channels%2Fpaths%2F~1channels~1{channel_id}%2Fdelete to archive a channel.
  2. Use https://api.mattermost.com/#tag/channels%2Fpaths%2F~1channels~1{channel_id}~1restore%2Fpost to unarchive a channel
  3. Observe that it takes 30-35 minutes before any messages can be posted in the channel, despite being visible in the user interface.

thanks jasonblais, thes are the APIs i am using, but i was confused as i could not find any information about the 30-35 min that i should wait :frowning:

Hey @nina.utkin,

I don’t think 30-35 minute wait time is expected, I just included it as an observed behaviour.

I’ll share it with our team and try reproduce. If they have further questions, I’ll let you know :slight_smile:

1 Like

Hey @nina.utkin, two follow-up questions for you:

After you have un-archived a channel and attempt to post a message in the channel, do you receive error messages in the user interface? If not, can you check if

  1. There are any errors in the server logs when attempting to post (in System Console > Logs)
  2. There are any errors in the JavaScript console - here is how to check.

Hi @nina.utkin - after investigating it, we suspect it might be due to caching or database replication.

Can you help with the following steps:

  1. Go to System Console > General > Configuration page and click the Purge All Caches button.
  • Try if the issue is resolved. If yes, it was caused by caching. If not
  1. Go to your config.json file, and find the DataSourceReplicas setting under SqlSettings.
  • Please post how many replicas have been listed under this setting, or if none have been listed.

This information would require System Admin access, so let me know if you have any questions about it.

Hope to get this resolved for you soon! :slight_smile: