Over the past couple of days pulumi commands have ...
# general
m
Over the past couple of days pulumi commands have become very slow for me. what used to run in 30 seconds now take 5+ minutes to, seemingly just to get started. I often need to run
pulumi cancel
to restart it after it has hung for more than 5 minutes on the same step with no updates in the CLI or the web. I am not sure how to troubleshoot pulumi itself for this. It has happened before and I think the only solution I found was to destroy and recreate the environment. I have tried refresh and repair. I have also ran it as
pulumi up -v4
to see if I could see anything happening. This would be easier to troubleshoot if I could force pulumi to tell me exactly what it is trying to do at any given point. for example. Pulumi has been sitting in this position for 17 minutes as of now.
Copy code
PS D:\Source\MarketForge\azure-deploy> pulumi up -fy -v4 
Updating (test)

View in Browser (Ctrl+O): <https://app.pulumi.com/ajwtech/marketing/test/updates/434>

   Type  Name  Status
Before that these were the times of my last few runs, 1. 11 minutes running before I canceled it. 2. 3 minutes, ran to completion. The changes to the stack make this time acceptable. we rebuilt several docker images during it and I could see that was what was happening in the output 3. 57s 4. 43s 5. 2m 6. 2m 7. 3m 8. 32s 9. 31m 56s This was a very long run pulumi says it succeeded but the output says it failed.
Copy code
Type                                               Name                          Status               Info
     pulumi:pulumi:Stack                                marketing-test                **failed**           4 errors
 +-  ├─ command:local:Command                           bind-crm-custom-domain        replaced (0.00s)     [diff: ]
 ~   ├─ azure-native:app/v20241002preview:ContainerApp  vtiger-app                    updated (20s)        [diff: ~template]
 ~   ├─ docker-build:index:Image                        marketing-mautic-app          updated (4s)         [diff: ~contextHash]; 1 warning
 ~   ├─ docker-build:index:Image                        marketing-nginx               updated (68s)        [diff: ~contextHash]; 1 warning
 ~   ├─ azure-native:app/v20241002preview:ContainerApp  mautic-web                    updated (20s)        [diff: ~template]
 +-  ├─ command:local:Command                           Check for Config File Exists  replaced (0.00s)     [diff: ]
 ~   ├─ azure-native:app/v20241002preview:ContainerApp  mautic-nginx                  updated (20s)        [diff: ~template]
 +-  ├─ command:local:Command                           bind-map-custom-domain        replaced (0.00s)     [diff: ]
 ~   ├─ docker-build:index:Image                        marketing-vtiger-app          updated (12s)        [diff: ~contextHash]; 1 warning
 +-  └─ command:local:Command                           bind-cms-custom-domain        replaced (0.00s)     [diff: ]
 
Diagnostics:
  pulumi:pulumi:Stack (marketing-test):
    error: 
    
             Detected that C:\Users\AdamWheeler\.pulumi\plugins\resource-random-v4.17.0\pulumi-resource-random.exe exited prematurely.
    error:          This is *always* a bug in the provider. Please report the issue to the provider author as appropriate.
    error: To assist with debugging we have dumped the STDOUT and STDERR streams of the plugin:
    error:
Also does anyone know how to kill the running command in a way that can return to the prompt? Ctrl-c does stop it from running but it does not return to the prompt so I can enter another command. I have also tried a double ctrl-c because I read online that was "what pulumi expects" but that did not work either. any help would be greatly appreciated.
s
m
I will try adding the verbose tracing and see what I get. Thanks.
I disabled Microsoft defenders real time protection and now it runs so much faster! I did all the debugging I could in Pulumi but the results were so inconsistent that I decided the problem was likely not pulumi. It turned out that the real time protection was scanning every file pulumi wanted to touch. Defender is also designed to run in the background and not affect system performance. but because pulumi had to wait until defender released the file lock it was slowing down a lot, especially when something like node_modules changed.