Replies: 2 comments
-
Probably, you figured this out but you want to use the stream option:
By default, snapshot:load will load the entire snapshot into memory which may cause problems when using large files. To avoid this, you can pass the --stream option to stream the snapshot to the database one statement at a time. |
Beta Was this translation helpful? Give feedback.
-
I had an issue where INSERT statements (restoring db) where failing without a real reason (export syntax was ok). Figured out MySQL couldn't load the query (single line) in memory and just failed halfway through. This fixed it (in 'dump' => [
// Prevent long INSERT statements when snapshotting database (25MB)
'addExtraOption' => '--max-allowed-packet=25000000 --net_buffer_length=25000000',
], Export again after this. It sets the maximum buffer to 25MB so single-line INSERT and other statements don't exceed that limit. |
Beta Was this translation helpful? Give feedback.
-
Symfony\Component\ErrorHandler\Error\FatalError
Allowed memory size of 536870912 bytes exhausted (tried to allocate 186770585 bytes)
Beta Was this translation helpful? Give feedback.
All reactions