the problem is in the categories, the prestashop installation is clean, there are no modules installed I just started entering the categories, when I started to reach the 5000 categories I received OutOfMemoryException, adding others and arriving around 5500 categories I get error 500. By increasing the value of memorylimit in php.ini from 512M to 1024M I had no problems, by the time I approached the 10000 categories same problem so I brought memorylimit to 3072M but now I have reached 20000 categories same problem. Memory usage is excessive. Disabling the block, I will associate the categories with a specific php extension.
The problem occurs with prestashop 1.6 and 1.7, if you want to test it send the sql of the categories.