Skip to content

Deployment hung after migration #14

@ehmatthes

Description

@ehmatthes

Hi, I finally had a chance to try this, and it looks pretty impressive! I wanted to report what worked for me, and where the deployment seems to have gotten stuck.

I took the sample project from django-simple-deploy, and followed the instructions in the dsd-pythonanywhere readme. I watched it open a console in the browser, and it worked all the way through the migration:

...
Building wheels for collected packages: dsd-pythonanywhere, docopt
  Building wheel for dsd-pythonanywhere (pyproject.toml) ... done
  Created wheel for dsd-pythonanywhere: filename=dsd_pythonanywhere-0.1.0-py3-none-any.whl size=17282 sha256=902d14397f4811
339ad8d694d396d6ec5e33579e797708313ea84230d28075ec
  Stored in directory: /tmp/pip-ephem-wheel-cache-h4d9d4ni/wheels/89/d3/b5/c99171e732f27267e62c723688259d7743dce0791546b36d
13
  Building wheel for docopt (pyproject.toml) ... done
  Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13783 sha256=dc4ab58072aa0eb4b6ad43e6ce3c4601ae
93825a25750d9c992fd86f3a7dee1e
  Stored in directory: /home/ehmatthes/.cache/pip/wheels/0b/1d/03/175286677fb5a1341cc3e4755bf8ec0ed08f3329afd67446b0
Successfully built dsd-pythonanywhere docopt
Installing collected packages: schema, docopt, urllib3, ...
  Attempting uninstall: pip
    Found existing installation: pip 26.0.1
    Uninstalling pip-26.0.1:
      Successfully uninstalled pip-26.0.1
Successfully installed annotated-doc-0.0.4 asgiref-3.8.1...
Creating .env file...
.env file created.
Running migrations and collectstatic...
Operations to perform:
  Apply all migrations: admin, auth, blogs, contenttypes, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  ...
  Applying blogs.0002_blog_public_blogpost_public... OK
  Applying sessions.0001_initial... OK
127 static files copied to '/home/ehmatthes/blogmaker-lite-pa/static'.
Setup complete!!!
02:19 ~ $

The console in the browser seemed to be finished, but I saw this in my local terminal where I ran the deploy command:

[main e598aec] Configured project for deployment.
 4 files changed, 49 insertions(+), 8 deletions(-)
Pushing changes to remote repository...
Deploying to PythonAnywhere...
  Cloning and running setup script: curl -fsSL https://raw.githubusercontent.com/caktus/dsd-pythonanywhere/refs/heads/main/scripts/setup.sh | bash -s -- https://github.com/ehmatthes/blogmaker-lite-pa.git blogmaker-lite-pa blog
  No active bash console found, starting a new one...
    Attempt 0: checking if console is ready
  API error status_code=412 error_data={'error': 'Console not yet started.  Please load it (or its iframe) in a browser first'}
    Console not started, opening browser...
    Attempt 1: checking if console is ready
    Polling attempt 1: waiting for command 'echo hello' to complete
  Command 'echo hello' completed
    Console is ready
    Polling attempt 1: waiting for command 'curl -fsSL https://raw.githubusercontent.com/caktus/dsd-pythonanywhere/refs/heads/main/scripts/setup.sh | bash -s -- https://github.com/ehmatthes/blogmaker-lite-pa.git blogmaker-lite-pa blog' to complete
  Command not finished yet, sleeping before next poll...
    Polling attempt 2: waiting for command 'curl -fsSL https://raw.githubusercontent.com/caktus/dsd-pythonanywhere/refs/heads/main/scripts/setup.sh | bash -s -- https://github.com/ehmatthes/blogmaker-lite-pa.git blogmaker-lite-pa blog' to complete
  Command not finished yet, sleeping before next poll...
    ...
    Polling attempt 13: waiting for command 'curl -fsSL https://raw.githubusercontent.com/caktus/dsd-pythonanywhere/refs/heads/main/scripts/setup.sh | bash -s -- https://github.com/ehmatthes/blogmaker-lite-pa.git blogmaker-lite-pa blog' to complete
  Command not finished yet, sleeping before next poll...
    Polling attempt 14: waiting for command 'curl -fsSL https://raw.githubusercontent.com/caktus/dsd-pythonanywhere/refs/heads/main/scripts/setup.sh | bash -s -- https://github.com/ehmatthes/blogmaker-lite-pa.git blogmaker-lite-pa blog' to complete
  Command not yet visible in output, waiting...
    Polling attempt 15: waiting for command 'curl -fsSL https://raw.githubusercontent.com/caktus/dsd-pythonanywhere/refs/heads/main/scripts/setup.sh | bash -s -- https://github.com/ehmatthes/blogmaker-lite-pa.git blogmaker-lite-pa blog' to complete
  ...
    Polling attempt 40: waiting for command 'curl -fsSL https://raw.githubusercontent.com/caktus/dsd-pythonanywhere/refs/heads/main/scripts/setup.sh | bash -s -- https://github.com/ehmatthes/blogmaker-lite-pa.git blogmaker-lite-pa blog' to complete
  Command not yet visible in output, waiting...

I canceled this with Ctrl-C, because it didn't seem like it was getting anywhere. I watched the video you shared earlier, and I could see that your deployment carried on much quicker after the web console finished its work.

In my PA dashboard I see a "Bash console", but I don't see any web apps. Should it have created a web app?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions