WordPress overrides PHP's memory limit to 256M, with the assumption that whatever it was set to before is going to be too low to render the dashboard. You can override this by defining WP_MAX_MEMORY_LIMIT in wp-config.php:
define( 'WP_MAX_MEMORY_LIMIT' , '512M' );
This code is working fine for me, hope this will help you.