I have seen many players having this issue where the game crashes anytime with an error message saying ‘Engine error out of memory’. This error refers to basically what it says. Your system just ran out of available memory to run Team Fortress 2.
If you have enough funds to upgrade your memory than do it. It will definitely solve this error.
But if you don’t want to spend your hard-earned money for a silly error than you can do one thing. You will need to change your pagefile settings. Basically, when your system runs out of RAM it uses some part of your hard disk as RAM to keep functioning properly. It is called as Pagefile.
This feature might be turned OFF somehow which led to this error.
Step 1: Right click on the ‘My Computer’ icon and go to properties
Step 2: Click on ‘Advanced system settings’ from the left sidebar
Step 3: Go to the ‘Advanced’ tab and click on ‘Settings’ present in the Performance section
Step 4: Then again go to ‘Advanced‘ tab and click on the ‘Change’ button
Step 5: Uncheck the ‘Automatically manage paging size for all drives’
Step 6: Uncheck the ‘Automatically manage paging size for all drives’ option.
Step 7: Select the ‘Custom size’ option and set the Initial size to 200MB and maximum size to 3000MB (for 4GB RAM system) or 4096MB(for 8GB RAM).
Step 7: Don’t forget to click ‘Set’ and then ‘Apply’.
If you set it on 3000MB and still the game crashes, try increasing it by 200MBs until it resolves the issue. But if you increase further than that, the game will tend to stutter and you will start seeing frame drops while playing.
Additional tip: In case you noticed lag after resolving the issue, you can try disabling ‘Sysmain’ service from the services. Additionally, you must update your Windows 10 for better performance. It really makes the difference.
If all the above things didn’t help, try lowering the graphics quality and disabling multi-core rendering from the in-game menu.