I'd suggest you start by significantly bumping the request for memory and removing the limit from the pod in your dev environment. This will allow your code to run, and for you to better troubleshoot without adding the Kubernetes complexities. Limits for memory tell Kubernetes to kill the pod if it reaches that value.
After you have your code working properly, put your resource limit back.