How to change "MaxMemInQueues"?

should not be hard-coded, it can be set with this line in your torrc:

MaxMemInQueues 1024 MB       # Limit Memory usage to

How much memory does the system the obsf4 proxy is running on have?
Maybe you could post the error message from your logs?