CartoDB / carto-python

CARTO Python client
https://carto.com
BSD 3-Clause "New" or "Revised" License
154 stars 62 forks source link

Internal dataset pages failing to load after running batch_client.create_and_wait_for_completion #114

Open andy-esch opened 5 years ago

andy-esch commented 5 years ago

I'm using batch_client.create_and_wait_for_completion through a new cartoframes method (CartoContext.execute in master).

Sometimes after running this method my datasets pages (so I can't view the data, run sql, etc.) or map pages do not load in my carto account. For example, I'm not able to access Builder to edit a map, I just get a timeout / ERR_EMPTY_RESPONSE. My dashboard seems unaffected.

Screen Shot 2019-05-09 at 11 16 10 AM

The pages won't load for an hour or two, even if I cancel the batch sql api job behind the method call. The public version of the pages (if they exist) load normally, but the internal dataset pages (when I'm logged in) do not load like in the screenshot above.

Steps to Reproduce

  1. Install carto python sdk from master branch: $ pip install git+https://github.com/cartodb/carto-python.git
  2. Create an auth client, a batch sql client, and then run a query:
    from carto.sql import BatchSQLClient
    bsc = BatchSQLClient(cc.auth_client)
    bsc.create_and_wait_for_completion(f"SELECT CDB_CartoDBFyTable('eschbacher', 'tablename')")
  3. Try to load a dataset page in user account (even if it's not involved in query applied above). I've had mixed success in this triggering the problem described above.

cc @alrocar