When using a one-off dyno (e.g.
heroku run ...) I am hitting memory limits.
One off dynos can use any of the available dyno types via the
--size argument. You can find instructions for using this here https://devcenter.heroku.com/articles/one-off-dynos#one-off-dyno-type
Please note that the use of larger dyno sizes for one-off dynos requires the
web dyno for the app to be at least
standard-1x. If you are not using web dynos for your app you can set these sizes and then scale the web process down to zero to continue using larger one-off dyno sizes.