Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert methods hangs sometimes. #172

Open
pankajmalhotra09 opened this issue Jul 12, 2018 · 5 comments
Open

Convert methods hangs sometimes. #172

pankajmalhotra09 opened this issue Jul 12, 2018 · 5 comments

Comments

@pankajmalhotra09
Copy link

pankajmalhotra09 commented Jul 12, 2018

Hi,

I am using TuesPechkin v2.0.50727 in a web application hosted on IIS. I have created a static class for converter. To generate a PDF file I am only passing the document details to the convert method written in my static class. But sometimes tuesPechkin hangs while generating a PDF file. In such cases IIS reset is required to start generating PDF again. I have also observed that the html file for which tuesPechkin hangs is coped to the temp folder with name "wktemp-*" but not converted. When a file is converted to PDF, the html file is deleted from temp folder and only PDFfile is present.

Following code is used to create the static class.

public static class PeckinConvertor
{
private static IConverter converter =
new ThreadSafeConverter(
new RemotingToolset(
new Win32EmbeddedDeployment(
new TempFolderDeployment())));

    public static byte[] Convert(HtmlToPdfDocument document)
    {
        byte[] result = new byte[1];
            lock (converter)
            {
                var tmp = new TuesPechkin.TempFolderDeployment();
                result = converter.Convert(document);
            }
        return result;
    }

}

In order to generate the PDF I am creating a document object and passing it to the convert method of the static class. This issue is very random in nature. Sometimes it work perfectly for weeks and sometimes I face this issues on daily basis.

Please help me resolve this issue.
Thanks in Advance

@ghost
Copy link

ghost commented Jul 24, 2018

Hello,

We have the same issue with TuesPechkin on the IIS environment - the Convert method hangs randomly and just recycling the App Pool resolve the issue. This is happening usually after a code deploy.

Do you have any workaround for this?

Thank you,
Ion

@tloy1966
Copy link

Did you try unload RemotingToolset?

@vsarunov
Copy link

vsarunov commented Dec 7, 2018

@tloy1966 using unload it will crash the application after second request when trying to convert.

@jackiemanzzz
Copy link

@vsarunov did you find any solution for hanging or crash?

@vishalpandeyknp
Copy link

I am also facing the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants