The following forum(s) have migrated to Microsoft Q&A (Preview): Azure Virtual Machines!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
Azures' windows VM is getiing restarted 1-3 times daily running simple Django server RRS feed

  • Question

  • I'm running a Django server in a Windows VM in the Azure portal.

    I'm running Windows server 2019 8 GB ram and 4 virtual processors.

    The Server has 10-30 requests per minute, and the main function is to parse a file in an external software using ```pyautogui``` to interact with the buttons of the external software.

    Since I'm using that library, I always need to have the connection open in another VM, but this last never gets restarted running the same Django server (with the difference that this does not receive requests)The Event Viewer of windows never has any insight about the issue... so I would like to know if any of you have faced something similar?

    Any help would appreciated. I have had this issue a long long time ago and right now the only solution is having a status bot to check the server availability and knowing when i have to restart it.


    • Edited by jujopalacio Monday, November 25, 2019 10:41 PM
    Monday, November 25, 2019 4:05 AM

All replies

  • Monday, November 25, 2019 4:26 AM
  • Hi jujopalacio,

    Go to the VM blade in the azure portal and select "activity logs" on the left  side menu.

    Change the timestamp in the filter as needed(default last 6 hours)

    Then look at the logs which saya restarted virtual machine.  Check if that matched with the time where your server is not reachable.

    Also login to the server and check the uptime.

    If the uptime is as expected, Then we need to check your application (Django) logs and figure out why its stopping

    Monday, November 25, 2019 5:27 AM
  • Hello,

    Any update on the issue?

    If the suggested response helped you resolve your issue, do click on "Mark as Answer" and "Up-Vote" for the answer that helped you for benefit of the community.

    Thanks.

    Tuesday, November 26, 2019 11:04 AM
  • Hi Malleswar,

    Thanks for your help, though I does not have multiple VHD attached to my VM. only 1, so do you think the could exist anohter idea?

    Thursday, November 28, 2019 7:12 PM
  • Hi Jakaruma,

    I have checked the activity logs but none of them have the keyword "restarted" or something barely similar.

    Also, how can i check the uptime? i'm pretty sure that the VM is the one that is gettting restarted because evey time that the server uptime bot notify me that is down i get in to the VM and all the windows/programs are closed.

    Do you think in another idea?

    Regards

    Thursday, November 28, 2019 7:20 PM
  • FYI, none of the answers have been helpfuly

    Thursday, November 28, 2019 7:22 PM
  • You can find the uptime in the Task manager under performance.

    How are you starting the django app?

    Will that django app write logs? will you be able to share the logs?

    Send your subscription id and the VM name to this email id AzCommunity@microsoft.com along with this thread URL.

    I will check the info in the backend.

    Friday, November 29, 2019 12:48 PM
  • Hello,

    Any update on the issue?

    Thanks.
    Tuesday, December 3, 2019 4:38 PM