djangorestamazon-web-servicesherokudjango-piston

Heroku + Django + Piston


I'm using Heroku with Django and using Piston for API stuff.

We migrated from plain Amazon EC2 to Heroku. Everything works (every aspect of the website) except for some of the API calls.

When I run an API call to get a list of objects (trees) that user has, I get the following:

RuntimeError at /api/tree.json
maximum recursion depth exceeded while calling a Python object

Anyone have any ideas of why this could be? Thanks in advance, I'd really appreciate any hints/advice!


Solution

  • This was a tricky problem to debug. It turned out that the problem was that Heroku dynos can't see each other's temp directory. This meant that after migrating to Heroku even though we wrote a file to the temporary directory, when we scheduled a task to process that file, the file would mysteriously not be there. We solved this by writing the files directly to S3 (instead of using the temporary directory).

    Also, Piston's new version has a database schema change, so make sure that that is updating correctly!