# Single e-mail stop working - Error 500

**URL:** https://forum.mautic.org/t/single-e-mail-stop-working-error-500/17469
**Category:** Product Support
**Created:** [December 18, 2020, 5:44pm UTC](https://forum.mautic.org/t/single-e-mail-stop-working-error-500/17469 "2020-12-18T17:44:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rodrigooliveira](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rodrigooliveira/32/510_2.png) [@rodrigooliveira](https://forum.mautic.org/u/rodrigooliveira)
#### Post date: [December 18, 2020, 5:44pm UTC](https://forum.mautic.org/t/single-e-mail-stop-working-error-500/17469/1 "2020-12-18T17:44:16Z")

</div>

**software**  
My Mautic version is: **v3.0.2**  
My PHP version is: **7.3.22-1** +ubuntu20.04.1+deb.sury.org+1

My problem is:  
So, until yesterday my mautic was running perfectly (is about a month that I’m not having any kind of issue), everything was working really fine.

But today, when I tried to send a single e-mail through the contact field, I realized that stop working. The screen keeps loading forever, and the console of chrome shows an 500 (Internal Server Error) status.

 ![Mautic_Error_01](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/e/ead62aa40998fdb3b6094104aa8949f3cfcb0e62.png)  
 ![Mautic_Error_02](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/ac2e4e7d46edd444ded7e10723e37d2798a6cbe0.png)

I send e-mail almost every day through this feature 🙄.

These errors are showing in the log:  
[2020-12-18 02:25:15] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:segments:update`    
[2020-12-18 02:25:15] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:campaigns:trigger`    
[2020-12-18 02:25:15] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:reports:scheduler`    
[2020-12-18 02:25:15] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:import`    
[2020-12-18 02:25:15] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:campaigns:rebuild`    
[2020-12-18 02:25:20] mautic.WARNING: Command `mautic:campaigns:rebuild` exited with status code 1    
[2020-12-18 02:25:20] mautic.WARNING: Command `mautic:reports:scheduler` exited with status code 1    
[2020-12-18 02:25:20] mautic.WARNING: Command `mautic:campaigns:trigger` exited with status code 1    
[2020-12-18 02:25:20] mautic.WARNING: Command `mautic:segments:update` exited with status code 1    
[2020-12-18 02:25:20] mautic.WARNING: Command `mautic:import` exited with status code 1    
[2020-12-18 17:15:08] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:reports:scheduler`    
[2020-12-18 17:15:08] mautic.WARNING: Command `mautic:reports:scheduler` exited with status code 1    
[2020-12-18 17:15:08] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:import`    
[2020-12-18 17:15:08] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:social:monitoring`    
[2020-12-18 17:15:08] mautic.WARNING: Command `mautic:import` exited with status code 1    
[2020-12-18 17:15:08] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:messages:send`    
[2020-12-18 17:15:08] mautic.WARNING: Command `mautic:social:monitoring` exited with status code 1    
[2020-12-18 17:15:08] mautic.WARNING: Command `mautic:messages:send` exited with status code 1    
[2020-12-18 17:15:08] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:broadcasts:send`    
[2020-12-18 17:15:08] mautic.WARNING: Command `mautic:broadcasts:send` exited with status code 1    
[2020-12-18 17:31:20] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:reports:scheduler`    
[2020-12-18 17:31:20] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:import`    
[2020-12-18 17:31:20] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:social:monitoring`    
[2020-12-18 17:31:20] mautic.WARNING: Command `mautic:import` exited with status code 1    
[2020-12-18 17:31:20] mautic.WARNING: Command `mautic:social:monitoring` exited with status code 1    
[2020-12-18 17:31:20] mautic.WARNING: Command `mautic:reports:scheduler` exited with status code 1    
[2020-12-18 17:31:20] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:messages:send`    
[2020-12-18 17:31:20] mautic.WARNING: Command `mautic:messages:send` exited with status code 1    
[2020-12-18 17:31:21] mautic.NOTICE: Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 while running console command `mautic:broadcasts:send`    
[2020-12-18 17:31:21] mautic.WARNING: Command `mautic:broadcasts:send` exited with status code 1

**Steps I have tried to fix the problem:**  
Since I didn’t make any changes (on my VPS or mautic configuration) I don’t know what to do.  
I already clear the cache and restart my VPS through AWS.

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [December 20, 2020, 9:02am UTC](https://forum.mautic.org/t/single-e-mail-stop-working-error-500/17469/2 "2020-12-20T09:02:11Z")

</div>

Hi, actually all your cron commands fail, not just email sending. Did segments upgrade? All okay with your sql tables?  
Joey

---

<div class="post-metadata">

### Author: ![rodrigooliveira](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rodrigooliveira/32/510_2.png) [@rodrigooliveira](https://forum.mautic.org/u/rodrigooliveira)
#### Post date: [December 21, 2020, 1:13am UTC](https://forum.mautic.org/t/single-e-mail-stop-working-error-500/17469/3 "2020-12-21T01:13:15Z")

</div>

Hi Joey, thanks for answering.

Yes, actually I notice that (that all my cron commands did fail), and this is very weird since I was running the same crons for at least one month, and I didn’t notice any issue. Everything was running fine, campaign, email, segments, etc.

Maybe it can be a problem with my database, a couple of minutes ago, I tried to test segments upgrade, but when I tried to save it, my mautic just stopped working, I get the “Can’t reach this page” error.

Yesterday I tried to log in, and it gave the return: “mautic database connection error (code #0)”, but I notice that just one time.

I solve that with the command line “sudo service mysql start” through ssh.

**This is the cron commands that I’m using:**

**Cron line:** \*/5 \* \* \* \* php /var/www/html/bin/console mautic:import  
**Cron line:** 5,20,35,50 \* \* \* \* php /var/www/html/bin/console mautic:campaigns:rebuild  
**Cron line:** 2,17,32,47 \* \* \* \* php /var/www/html/bin/console mautic:campaigns:trigger  
**Cron line:** 8,23,38,52 \* \* \* \* php /var/www/html/bin/console mautic:segments:update  
**Cron line:** 0,15,30,45 \* \* \* \* php /var/www/html/bin/console mautic:messages:send  
**Cron line:** 0,15,30,45 \* \* \* \* php /var/www/html/bin/console mautic:emails:send  
**Cron line:** 0,15,30,45 \* \* \* \* php /var/www/html/bin/console mautic:email:fetch  
**Cron line:** 0,15,30,45 \* \* \* \* php /var/www/html/bin/console mautic:social:monitoring  
**Cron line:** \* \*/30 \* \* \* php /var/www/html/bin/console mautic:webhooks:process  
**Cron line:** 0,15,30,45 \* \* \* \* php /var/www/html/bin/console mautic:broadcasts:send  
**Cron line:** \* 1 \* \* \* php /var/www/html/bin/console mautic:maintenance:cleanup --days-old=90 --dry-run  
**Cron line:** 0 4 15 \* \* php /var/www/html/bin/console mautic:iplookup:download  
**Cron line:** \*/5 \* \* \* \* php /var/www/html/bin/console mautic:reports:scheduler  
**Cron line:** 0 5 10 \* \* php /var/www/html/bin/console mautic:unusedip:delete

The single mail is working again (and I didn’t did anything), but now my mautic just work for a couple of minutes, after that, I have to restart my AWS VPS.

**My VPS hardware is very modest, so I don’t know if this may be the problem:**

description: Computer  
product: t3a.micro  
vendor: Amazon EC2  
width: 64 bits  
capabilities: smbios-2.7 dmi-2.7 smp vsyscall32  
\*-core  
description: Motherboard  
vendor: Amazon EC2  
physical id: 0  
\*-firmware  
description: BIOS  
vendor: Amazon EC2  
physical id: 0  
version: 1.0  
date: 10/16/2017  
size: 64KiB  
capacity: 64KiB  
capabilities: pci edd acpi virtualmachine  
\*-cpu  
description: CPU  
product: AMD EPYC 7571  
vendor: Advanced Micro Devices [AMD]  
physical id: 4  
bus info: cpu@0  
version: AMD EPYC 7571  
slot: CPU 0  
size: 2200MHz  
capacity: 3GHz  
width: 64 bits  
clock: 100MHz  
capabilities: lm fpu fpu\_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr\_opt pdpe1gb rdtscp x86-64 constant\_tsc rep\_good nopl nonstop\_tsc cpuid extd\_apicid tsc\_known\_freq pni pclmulqdq ssse3 fma cx16 sse4\_1 sse4\_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf\_lm cmp\_legacy cr8\_legacy abm sse4a misalignsse 3dnowprefetch topoext vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha\_ni xsaveopt xsavec xgetbv1 clzero xsaveerptr arat npt nrip\_save  
configuration: cores=1 enabledcores=1 threads=2  
\*-memory  
description: System memory  
physical id: 1  
size: 1GiB

**My database is very small, i have only:**  
Contacts: 251  
Mail templates: 6  
Segments: 10

I don’t know what to do here, if you have any recommendation or test that I should be running, I will appreciate that. Thank you!

---

<div class="post-metadata">

### Author: ![ouutcastveron](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ouutcastveron/32/5567_2.png) [@ouutcastveron](https://forum.mautic.org/u/ouutcastveron)
#### Post date: [August 12, 2021, 2:31am UTC](https://forum.mautic.org/t/single-e-mail-stop-working-error-500/17469/4 "2021-08-12T02:31:21Z")

</div>

Hi @rodrigooliveira, have you solved this issue?  
I have the same and need to restore everyday.  
@joeyk could you look at this?
