Chromium error: TargetCrashedException while running multiple instance in Linux Docker

31 views
Skip to first unread message

gowthamra...@gmail.com

unread,
Jul 13, 2020, 2:26:00 AM7/13/20
to headless-dev

Net Core 3.1
Chrome version: 77.0.3865.90
Windows 10

I’m trying to perform HTML to PDF conversion with class library in Linux Docker using NET Core 3.1. The HTML converter has some dependency packages to be installed in the environment where the conversion takes place. We have installed the package in docker file.

Actual issue is, we have run the application for converting online site to pdf using chromium headless mode. We have a button for conversion, whenever we tried the parallel conversion in multiple instance of chrome browser. It will throws the Target.Crashed exception after a few instance.

I have attached the docker file code here,


FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base RUN apt-get update && \ apt-get install -yq --no-install-recommends \ libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \ libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \ libnss3 WORKDIR /app EXPOSE 80 EXPOSE 443 FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster-slim AS build WORKDIR /src COPY ["HtmlToPDF_BlinkDocker_v3.1/HtmlToPDF_BlinkDocker_v3.1.csproj", "HtmlToPDF_BlinkDocker_v3.1/"] RUN dotnet restore "HtmlToPDF_BlinkDocker_v3.1/HtmlToPDF_BlinkDocker_v3.1.csproj" COPY . . WORKDIR "/src/HtmlToPDF_BlinkDocker_v3.1" RUN dotnet build "HtmlToPDF_BlinkDocker_v3.1.csproj" -c Release -o /app FROM build AS publish RUN dotnet publish "HtmlToPDF_BlinkDocker_v3.1.csproj" -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "HtmlToPDF_BlinkDocker_v3.1.dll"]


I have tried to increase the container storage size, still Im getting an same exception.

Can someone help me to resolve this exception in Linux docker using chromium binaries in VS2019.

Regards,
Gowtham K

Jerry Lee Daniel

unread,
Nov 19, 2023, 5:04:21 PM11/19/23
to headless-dev, gowthamra...@gmail.com
Loans, Project and Digital Investment financing available up to $500m.
Have a Business Plan, Fundable Project and Redeemable Collateral.

Whatsapp: +44 7405 896213
Reply all
Reply to author
Forward
0 new messages