Azure Web App Linux Container WEBSITES_ENABLE_APP_SERVICE_STORAGE=true Warmup timeout error

Werner Mairl 1 Reputation point
2020-01-02T16:01:32.85+00:00

Hi

I have a docker container with a asp net core 3.1 app inside (using SQLite with files stored on /home/db.sqlite)

The app is up and running without problems - with WEBSITES_ENABLE_APP_SERVICE_STORAGE==false.

If i change this setting to true then the container start fails with a timout during warmup.

there is no additional info/exception :

  • not in Application Inside
  • not in Console Log (i have access to docker console log) and log filters are off

the app looks like frozen!

Any idea ?

btw: with "mount storage (preview)" i have the same problems, so the issue may releated to the mounting in general.

Other observations: my app should create sqlite files on the mount: they are there .. that means basic write access is working.

But no idea why the entire app is "frozen" and not able to produce a output (trace levels at maximum).

(Frozen means: WebHostbuilder.Run has started, EF-Migrations are executed and then NO HTTPresponses (Warmup and others).....

WITHOUT mount or WEBSITES_ENABLE_APP_SERVICE_STORAGE everything is working....

any help/idea is welcome

regards
Werner

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,879 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Werner Mairl 1 Reputation point
    2020-01-03T08:50:51.173+00:00

    thanks for answering!
    assuming i have multiple problems on the same time... try to sort out and give more info!

    my dockerfile basically looks like the following:

    FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
    WORKDIR /app
    EXPOSE 80
    
    FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as dotnet-build
    WORKDIR /src
    
    FROM dotnet-build as publish
    WORKDIR /src
    COPY . .
    
    ARG BUILD_VERBOSITY=quiet
    ARG BUILD_CONFIGURATION=Release
    
    RUN chmod +x ./cli-linux/build-inside-docker.sh
    RUN ./cli-linux/build-inside-docker.sh $BUILD_VERBOSITY $BUILD_CONFIGURATION
    
    FROM base AS final
    
    ENV ConnectionStrings:TrailDB="Data Source=/home/trail365_dockerized2.sqlite"
    ENV ConnectionStrings:IdentityDB="Data Source=/home/identity365_default.sqlite"
    ENV ConnectionStrings:TaskDB="Data Source=/home/task365_default.sqlite"
    
    WORKDIR /app
    COPY --from=publish /app .
    ENTRYPOINT ["dotnet", "MSS.Trail365.Web.dll"]
    

    means: workdir points to /app... no need to use external storage.
    the only place where i need external storage is inside connectionstrings.

    0 comments No comments

  2. Werner Mairl 1 Reputation point
    2020-01-03T15:51:37.3+00:00

    Back to the roots....improved my understanding around azure appservices, configs and restarts... but the core issue is remaining:

    if i'm touching files inside external storage (mount) then the process seems to be stopped/freezing without any warning exception whatever......

    I have configured a console logger (DefaultLevel "Trace") that produces a lot of outputs on every run.

    if i'm starting the app with a configuration that uses the external storage (mount) then the console log looks like:

    2020-01-03T15:31:41.384933633Z Start WebHost building...
    2020-01-03T15:31:44.788643822Z WebHost building completed!
    2020-01-03T15:31:44.916356770Z [40m[37mdbug[39m[22m[49m: Microsoft.AspNetCore.Hosting.Diagnostics[3]
    2020-01-03T15:31:44.916382871Z       Hosting starting
    2020-01-03T15:31:45.342696684Z TryGetSqliteFileInfo: cn='Data Source=/usr/local/ttt/traildb.sqlite'
    2020-01-03T15:31:45.394074712Z TryGetSqliteFileInfo: fileName(raw)='/usr/local/ttt/traildb.sqlite'
    2020-01-03T15:31:45.428541705Z TryGetSqliteFileInfo: fileName(full)='/usr/local/ttt/traildb.sqlite', exists=False, directory.exists=True
    2020-01-03T15:31:45.429057821Z TryGetSqliteFileInfo: cn='Data Source=/usr/local/ttt/identity365_2.sqlite'
    2020-01-03T15:31:45.429437633Z TryGetSqliteFileInfo: fileName(raw)='/usr/local/ttt/identity365_2.sqlite'
    2020-01-03T15:31:45.432625034Z TryGetSqliteFileInfo: fileName(full)='/usr/local/ttt/identity365_2.sqlite', exists=False, directory.exists=True
    2020-01-03T15:31:45.977938419Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Infrastructure[10401]
    2020-01-03T15:31:45.977974620Z       An 'IServiceProvider' was created for internal use by Entity Framework.
    2020-01-03T15:31:49.021498792Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Model.Validation[10600]
    2020-01-03T15:31:49.171148035Z [40m[32minfo[39m[22m[49m: Microsoft.EntityFrameworkCore.Infrastructure[10403]
    2020-01-03T15:31:49.171187236Z       Entity Framework Core 3.1.0 initialized 'TrailContext' using provider 'Microsoft.EntityFrameworkCore.Sqlite' with options: None
    2020-01-03T15:31:49.443511168Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Database.Connection[20000]
    2020-01-03T15:31:49.443549270Z       Opening connection to database 'main' on server '/usr/local/ttt/traildb.sqlite'.
    2020-01-03T15:31:49.481590875Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Database.Connection[20004]
    2020-01-03T15:31:49.481624176Z       An error occurred using the connection to database 'main' on server '/usr/local/ttt/traildb.sqlite'.
    2020-01-03T15:31:49.492641526Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Migrations[20400]
    2020-01-03T15:31:49.492657026Z       Migrating using database 'main' on server '/usr/local/ttt/traildb.sqlite'.
    2020-01-03T15:31:49.499777352Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Database.Connection[20000]
    2020-01-03T15:31:49.499808253Z       Opening connection to database 'main' on server '/usr/local/ttt/traildb.sqlite'.
    2020-01-03T15:31:49.502823448Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Database.Connection[20004]
    2020-01-03T15:31:49.502854449Z       An error occurred using the connection to database 'main' on server '/usr/local/ttt/traildb.sqlite'.
    2020-01-03T15:31:49.502963153Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Database.Connection[20000]
    2020-01-03T15:31:49.502995854Z       Opening connection to database 'main' on server '/usr/local/ttt/traildb.sqlite'.
    2020-01-03T15:31:49.508050314Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Database.Connection[20004]
    2020-01-03T15:31:49.508086615Z       An error occurred using the connection to database 'main' on server '/usr/local/ttt/traildb.sqlite'.
    2020-01-03T15:31:49.508872940Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Database.Connection[20000]
    2020-01-03T15:31:49.508901841Z       Opening connection to database 'main' on server '/usr/local/ttt/traildb.sqlite'.
    2020-01-03T15:31:55.674989889Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Database.Connection[20001]
    2020-01-03T15:31:55.675035691Z       Opened connection to database 'main' on server '/usr/local/ttt/traildb.sqlite'.
    2020-01-03T15:31:55.721498564Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Database.Command[20103]
    2020-01-03T15:31:55.721533665Z       Creating DbCommand for 'ExecuteNonQuery'.
    2020-01-03T15:31:55.781808675Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Database.Command[20104]
    2020-01-03T15:31:55.781884878Z       Created DbCommand for 'ExecuteNonQuery' (31ms).
    2020-01-03T15:31:55.793603149Z [40m[37mdbug[39m[22m[49m: Microsoft.EntityFrameworkCore.Database.Command[20100]
    2020-01-03T15:31:55.793637850Z       Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='1800']
    2020-01-03T15:31:55.793655351Z       PRAGMA journal_mode = 'wal';
    
    2020-01-03T15:37:08.045257948Z Trail 365 0.7.977
    

    Process ended at Timestamp: 2020-01-03T15:31:55.793655351!!!!

    Timestamp 2020-01-03T15:37:08.045257948Z Trail 365 0.7.977 is the first line after restart seven minutes later

    0 comments No comments