Memory Caching Issue

Nextcloud version: 24.0.6
Operating system and version: Debian 11
Apache version: 2.4.54
PHP version: 7.4

The issue you are facing:

Is this the first time you’ve seen this error?: Yes

Steps to replicate it:

  1. Activate APCu cache
  2. Get a notification email

The output of your Nextcloud log in Admin > Logging:

[notifications] Error: Swift_TransportException: Connection to ssl://smtp.dynu.com:465 Timed Out at <<closure>>

 0. /var/www/cloud.tequenikality.net/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php line 342
    Swift_Transport_AbstractSmtpTransport->getFullResponse()
 1. /var/www/cloud.tequenikality.net/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php line 305
    Swift_Transport_AbstractSmtpTransport->executeCommand()
 2. /var/www/cloud.tequenikality.net/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php line 406
    Swift_Transport_EsmtpTransport->executeCommand()
 3. /var/www/cloud.tequenikality.net/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php line 502
    Swift_Transport_AbstractSmtpTransport->streamMessage()
 4. /var/www/cloud.tequenikality.net/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php line 518
    Swift_Transport_AbstractSmtpTransport->doMailTransaction()
 5. /var/www/cloud.tequenikality.net/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php line 206
    Swift_Transport_AbstractSmtpTransport->sendTo()
 6. /var/www/cloud.tequenikality.net/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php line 71
    Swift_Transport_AbstractSmtpTransport->send()
 7. /var/www/cloud.tequenikality.net/lib/private/Mail/Mailer.php line 195
    Swift_Mailer->send()
 8. /var/www/cloud.tequenikality.net/apps/notifications/lib/MailNotifications.php line 217
    OC\Mail\Mailer->send()
 9. /var/www/cloud.tequenikality.net/apps/notifications/lib/MailNotifications.php line 168
    OCA\Notifications\MailNotifications->sendEmailToUser()
10. /var/www/cloud.tequenikality.net/apps/notifications/lib/BackgroundJob/SendNotificationMails.php line 49
    OCA\Notifications\MailNotifications->sendEmails()
11. /var/www/cloud.tequenikality.net/lib/public/BackgroundJob/Job.php line 79
    OCA\Notifications\BackgroundJob\SendNotificationMails->run()
12. /var/www/cloud.tequenikality.net/lib/public/BackgroundJob/TimedJob.php line 95
    OCP\BackgroundJob\Job->execute()
13. /var/www/cloud.tequenikality.net/cron.php line 151
    OCP\BackgroundJob\TimedJob->execute()

at 2022-10-18T16:00:26+00:00

After enabling the APCu cache as-per the documentation, when I get notification emails sent now, it does so multiple times. In my case, my Cron is every 5 minutes, so emails get sent to me every 5 minutes for around an hour.

The admin logging says the SMTP request timed out (like it always has done) but I do get the emails. Now, after enabling APCu, multiple times over the course of an hour. Has anyone run into this before?