Media library error

Having an issue to upload files into media library and receiving Err connection reset in Chrome console.
We have upgraded WP to 5.7.1 and we are using PHP 7.2.
Any idea how to solve this issue?