# ID Spam Logfile

**URL:** <https://forum.mautic.org/t/id-spam-logfile/36939>\
**Category:** Product Support\
**Created:** [November 18, 2025, 10:05am UTC](https://forum.mautic.org/t/id-spam-logfile/36939 "2025-11-18T10:05:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sicksack97](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/sicksack97/32/14611_2.png) [@sicksack97](https://forum.mautic.org/u/sicksack97)\
**Post date:** [November 18, 2025, 10:05am UTC](https://forum.mautic.org/t/id-spam-logfile/36939/1 "2025-11-18T10:05:27Z")

</div>

**Your software**  
My Mautic version is: 5.2.2  
My PHP version is: 8.2.29  
My Database type and version is: MariaDB 10.11.11

**Your problem**  
My problem is: ID Spam

These errors are showing in the log:

Around 300k per day.

root@srv1 /var/www/html/test.example.com/var/logs # wc -l mautic\_prod-2025-11-18.php  
64697 mautic\_prod-2025-11-18.php  
root@srv1 /var/www/html/test.example.com/var/logs # wc -l mautic\_prod-2025-11-18^Chp  
root@srv1 /var/www/html/test.example.com/var/logs # wc -l mautic\_prod-2025-11-16.php  
305428 mautic\_prod-2025-11-16.php  
root@srv1 /var/www/html/test.example.com/var/logs # wc -l mautic\_prod-2025-11-15.php  
357606 mautic\_prod-2025-11-15.php  
root@srv1 /var/www/html/test.example.com/var/logs # wc -l mautic\_prod-2025-11-14.php  
328108 mautic\_prod-2025-11-14.php  
root@srv1/var/www/html/test.example.com/var/logs#

[2025-11-18T09:35:19.322776+00:00] mautic.CRITICAL: Uncaught PHP Exception Doctrine\ORM\EntityNotFoundException: “Entity of type ‘Mautic\LeadBundle\Entity\Lead’ for IDs id(6058445) was not found” at /var/www/html/test.example.com/vendor/doctrine/orm/src/EntityNotFoundException.php line 33 {“exception”:“[object] (Doctrine\ORM\EntityNotFoundException(code: 0): Entity of type ‘Mautic\LeadBundle\Entity\Lead’ for IDs id(6058445) was not found at /var/www/html/test.example.com/vendor/doctrine/orm/src/EntityNotFoundException.php:33)”} {“hostname”:“[test.example.com](http://test.example.com)”,“pid”:3753266}  
[2025-11-18T09:35:19.833640+00:00] mautic.CRITICAL: Uncaught PHP Exception Doctrine\ORM\EntityNotFoundException: “Entity of type ‘Mautic\LeadBundle\Entity\Lead’ for IDs id(6058445) was not found” at /var/www/html/test.example.com/vendor/doctrine/orm/src/EntityNotFoundException.php line 33 {“exception”:“[object] (Doctrine\ORM\EntityNotFoundException(code: 0): Entity of type ‘Mautic\LeadBundle\Entity\Lead’ for IDs id(6058445) was not found at /var/www/html/test.example.com/vendor/doctrine/orm/src/EntityNotFoundException.php:33)”} {“hostname”:“[test.example.com](http://test.example.com)”,“pid”:3753357}  
[2025-11-18T09:35:19.854978+00:00] mautic.CRITICAL: Uncaught PHP Exception Doctrine\ORM\EntityNotFoundException: “Entity of type ‘Mautic\LeadBundle\Entity\Lead’ for IDs id(14555) was not found” at /var/www/html/test.example.com/vendor/doctrine/orm/src/EntityNotFoundException.php line 33 {“exception”:“[object] (Doctrine\ORM\EntityNotFoundException(code: 0): Entity of type ‘Mautic\LeadBundle\Entity\Lead’ for IDs id(14555) was not found at /var/www/html/test.example.com/vendor/doctrine/orm/src/EntityNotFoundException.php:33)”} {“hostname”:“[test.example.com](http://test.example.com)”,“pid”:3753357}  
[2025-11-18T09:35:19.951937+00:00] mautic.CRITICAL: Uncaught PHP Exception Doctrine\ORM\EntityNotFoundException: “Entity of type ‘Mautic\LeadBundle\Entity\Lead’ for IDs id(14555) was not found” at /var/www/html/test.example.com/vendor/doctrine/orm/src/EntityNotFoundException.php line 33 {“exception”:“[object] (Doctrine\ORM\EntityNotFoundException(code: 0): Entity of type ‘Mautic\LeadBundle\Entity\Lead’ for IDs id(14555) was not found at /var/www/html/test.example.com/vendor/doctrine/orm/src/EntityNotFoundException.php:33)”} {“hostname”:“[test.example.com](http://test.example.com)”,“pid”:3753357}

Steps I have tried to fix the problem:

Cleanup all records from the logs that are recorded for a day we have around 50k uniq ID’s that are comming from the logs.

I created a script:

#!/bin/bash

IDFILE=“id.txt”

while read LEAD\_ID; do  
echo “==========================================”  
echo “Deleting records for lead\_id: $LEAD\_ID”  
echo “==========================================”

```auto
mysql -u root database <<EOF

```

SET @lead\_idlead\_id := $LEAD\_ID;

DELETE FROM asset\_downloads WHERE lea@lead\_id\_id = @lead\_id;  
DELETE FROM campaign\_lead\_event\_log WH@lead\_idRE lead\_id = @lead\_id;  
DELETE FROM campaign\_l@lead\_idads WHERE lead\_id = @lead\_id;  
DELETE FROM comp@lead\_idnies\_leads WHERE lead\_id = @lead\_id;  
DELETE FROM dynamic@lead\_idcontent\_lead\_data WHERE lead\_id = @lead\_id;  
DELETE F@lead\_idOM dynamic\_content\_stats WHERE lead\_id = @@lead\_idead\_id;  
DELETE FROM email\_stats WHERE lead@lead\_idid = @lead\_id;  
DELETE FROM focus\_stats WHERE le@lead\_idd\_id = @lead\_id;  
DELETE FROM form\_submissions @lead\_idHERE lead\_id = @lead\_id;  
DELETE FROM lead\_categories WHE@lead\_idE lead\_id = @lead\_id;  
DELETE FROM lead\_comp@lead\_idnies\_change\_log WHERE lead\_id = @lead\_id;  
DELETE@lead\_idFROM lead\_devices WHERE lead\_id = @lead\_id;  
D@lead\_idLETE FROM lead\_donotcontact WHERE lead\_id = @lead\_@lead\_idd;  
DELETE FROM lead\_event\_log WHERE lead\_id @lead\_id @lead\_id;  
DELETE FROM lead\_frequencyrules WHER@lead\_id lead\_id = @lead\_id;  
DELETE FROM lead\_ips@lead\_idxref WHERE lead\_id = @lead\_id;  
DELETE FROM lead\_lists@lead\_idleads WHERE lead\_id = @lead\_id;  
DELETE FROM lead\_note@lead\_id WHERE lead\_id = @lead\_id;  
DELETE FROM lead\_p@lead\_idints\_change\_log WHERE lead\_id = @lead\_id;  
D@lead\_idLETE FROM lead\_stages\_change\_log WHERE lead\_@lead\_idd = @lead\_id;  
DELETE FROM lead\_tags\_xref WHERE @lead\_idead\_id = @lead\_id;  
DELETE FROM lead\_utmt@lead\_idgs WHERE lead\_id = @lead\_id;  
DELETE FROM message\_qu@lead\_idue WHERE lead\_id = @lead\_id;  
DELETE FROM monitoring\_@lead\_ideads WHERE lead\_id = @lead\_id;  
DELETE FROM page\_hit@lead\_id WHERE lead\_id = @lead\_id;  
DELETE FROM @lead\_idlugin\_citrix\_events WHERE lead\_id = @lead\_id;  
DELETE F@lead\_idOM point\_lead\_action\_log WHERE lead\_id = @lead\_i@lead\_id;  
DELETE FROM point\_lead\_event\_log WHERE lead\_id = @@lead\_idead\_id;  
DELETE FROM push\_ids WHERE lead\_id@lead\_id= @lead\_id;  
DELETE FROM push\_notification\_stats WHERE lead\_id = @lead\_id;  
DELETE FROM sms\_message\_stats WHERE lead\_id = @lead\_id;  
DELETE FROM stage\_lead\_action\_log WHERE lead\_id = @lead\_id;  
DELETE FROM tweet\_stats WHERE lead\_id = @lead\_id;  
DELETE FROM video\_hits WHERE lead\_id = @lead\_id;

EOF

done \< “$IDFILE”

root@srv1/var/www/html#tail id.txt  
8283561  
8283802  
8283830  
8283875  
8283876  
8283903  
8284351  
8284543  
8284547  
8284773

the Id’s recored in id.txt is only a little part for example.

---

<div class="post-metadata">

**Author:** ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)\
**Post date:** [November 23, 2025, 3:19pm UTC](https://forum.mautic.org/t/id-spam-logfile/36939/2 "2025-11-23T15:19:17Z")

</div>

Hi there! Seems like you are focusing on the cleanup (where you can let the database do some work for you - removing a lead should implicitly remove the entries from relates tables too… Also ideally use the API rather than direct sql : )

However: where do they come from? What does the Webserver access log say?
