0

I am trying to migrate a database from 1.9.3.1 ce to 2.2.2 ee using the data migration tool. I have done this before and had to deal with errors but I am not getting any errors. When it gets to this step-

[INFO][mode: data][stage: data migration][step: Map Step]: started 13%

it stalls. It happened yesterday so I restored the database and started over and it happened at exactly 13% again. I let it run for 12 hours to make sure it had enough time. Our store has about 5k customers, 25k items, and 15k orders so I don't think it is too big. Any ideas?

  • Both Source and Destination DB is on same RDS/DB server? – aman Feb 23 '18 at 15:37
  • No, I am going from remote to local server. – tjjen Feb 23 '18 at 16:08
  • there must be some error in any log – MagenX Feb 23 '18 at 17:48
  • @MagenX I have been looking through the logs to find anything but nothing has showed up. I looked in the access and error logs. Is there another one I should look at? – tjjen Feb 23 '18 at 18:40
  • Have you tried local to local ? I mean you try to put both the DB on local and try if it stuck or not at the same position. – aman Feb 24 '18 at 11:59
0

you have 3 options to understand this issue:

1 - open another session and check top, see if process is actually running:

31570 test+  20   0  753532 127000  51552 S   1.7  3.3   0:27.43 php bin/magento migrate:data -a /home/testmigration/public_html/vendor/magento/data-migration-tool/etc/opensource-to+

2 - starce process 31570 :

strace -p 31570 -s 99999

you will see whats going on inside, something like this:

poll([{fd=11, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=11, revents=POLLIN}])
recvfrom(11, "\1\0\0\1\1V\0\0\2\3def\2mg$catalog_product_entity_media_gallery\tentity_id\tentity_id\f?\0\n\0\0\0\3)@\0\0\0\5\0\0\3\376\0\0\2\0\5\0\0\4\0041189\5\0\0\5\376\0\0\2\0", 17222, MSG_DONTWAIT, NULL, NULL) = 122
sendto(11, "i\0\0\0\3SELECT `mg`.`entity_id` FROM `catalog_product_entity_media_gallery` AS `mg` WHERE (mg.value_id = '8221')", 109, MSG_DONTWAIT, NULL, 0) = 109
poll([{fd=11, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=11, revents=POLLIN}])
recvfrom(11, "\1\0\0\1\1V\0\0\2\3def\2mg$catalog_product_entity_media_gallery\tentity_id\tentity_id\f?\0\n\0\0\0\3)@\0\0\0\5\0\0\3\376\0\0\2\0\5\0\0\4\0041189\5\0\0\5\376\0\0\2\0", 17100, MSG_DONTWAIT, NULL, NULL) = 122

3 - install mytop and see database transactions.

MySQL on localhost (5.7.21-20)                                                                                                load 0.37 0.14 0.13 4/401 31777 up 2+16:11:30 [10:39:50]
 Queries: 43.2k   qps:    0 Slow:     0.0         Se/In/Up/De(%):    11/26/01/00 
 Sorts:     0 qps now:    1 Slow qps: 0.0  Threads:    2 (   2/   4) 00/14/00/00 
 Key Efficiency: 92.6%  Bps in/out:  90.8/ 58.2   Now in/out: 546.1k/535.6k

       Id      User         Host/IP         DB       Time    Cmd    State Query                                                                                                       
       --      ----         -------         --       ----    ---    ----- ----------                                                                                                  
      262      m2u_       localhost       m2d_          1  Query   update INSERT INTO report_event (`event_id`,`logged_at`,`event_type_id`,`object_id`,`subject_id`,`subtype`,`store_i
      264      root       localhost      mysql          0  Query starting show full processlist  

obviously some migrations can take long time, depends on data amount, connection speed and server specs

p.s. truncate logs, events, reports and other non-important or temporary data that you dont need in magento 2.

  • I started over and installed mytop. I watched it from the start and could see all the queries. Once it got to that same table it hung and said ID 1270 - User root - DB magento - Time 0 - Cmd Query starting show full process list. And that is where it sits. – tjjen Feb 26 '18 at 17:57
  • just strace this php pid and you will see, mysql process can be in sleep state for long time – MagenX Feb 26 '18 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.