# CSV imports fail - stalling In Progress, Runtime Less than 1 second

**URL:** <https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [August 27, 2022, 4:11pm UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199 "2022-08-27T16:11:53Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [August 29, 2022, 3:31pm UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199/5 "2022-08-29T15:31:13Z")

</div>

When I upload a fresh delete.csv file - one column of bounced emails for a clean-up process - and then try to mautic:import via SSH as ‘username’ (not root), I get the following error message:

```auto
Import 92 with 45 rows is starting.
  0/45 [>---------------------------] 0%
In AbstractMySQLDriver.php line 68:

  An exception occurred while executing 'INSERT INTO lead_event_log (user
  _id, user_name, bundle, object, action, object_id, date_added, properties,
  lead_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [1, "My Name", "lead", "import", "updated", 92, "2022-08-29 15:39:05", "{\"line\":3,
  \"file\":\"DELETE.csv\"}", "9670"]:

  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update
  a child row: a foreign key constraint fails (`username_mautic`.`lead_event_log`, CONSTRAINT `FK_78B7E97955458D` FOREIGN KEY (`lead_id`) REFERENCES
   `leads` (`id`) ON DELETE CASCADE)

In Exception.php line 18:

  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update
  a child row: a foreign key constraint fails (`username_mautic`.`lead_event_log`, CONSTRAINT `FK_78B7E97955458D` FOREIGN KEY (`lead_id`) REFERENCES
   `leads` (`id`) ON DELETE CASCADE)

In PDOStatement.php line 117:

  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update
  a child row: a foreign key constraint fails (`username_mautic`.`lead_event_log`, CONSTRAINT `FK_78B7E97955458D` FOREIGN KEY (`lead_id`) REFERENCES
   `leads` (`id`) ON DELETE CASCADE)

mautic:import [-i|--id [ID]] [-l|--limit [LIMIT]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>

```

I’ve run into ‘foreign key constraint fails’ in other places, probably the same issue. Does anyone know what this relates to?

What is FK\_78B7E97955458D?  
What is the role of lead\_event\_log in importing contacts data via csv?  
Is there a way to reset that table or whatever is causing these hang-ups?  
What is involved in the import process; what should I check?  
What does `VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)` mean - looks bad…?  
How can I solve [‘an integrity violation that seems to point to a foreign key that does not exist in the database’](https://forum.mautic.org/t/integrity-constraint-violation/16731/2)?

I’m at a dead end here. Any suggestions or best guesses how to troubleshoot this would be very much appreciated.

---

_[View the full topic](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199)._
