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

Tuespechkin takes a long time to respond, and returns null #180

Open
merdonalds opened this issue Apr 29, 2019 · 2 comments
Open

Tuespechkin takes a long time to respond, and returns null #180

merdonalds opened this issue Apr 29, 2019 · 2 comments

Comments

@merdonalds
Copy link

merdonalds commented Apr 29, 2019

Hey guys,

I'm currently using in my project TuesPechkin version 2.1.1, and also TuesPechkin.Wkhtmltox.AnyCPU v0.12.4.1

This is some of my code:

byte[] result = null;
try
{
var globalSettings = CreateGlobalSettings(portraitMode);
var objectSettings = CreateObjectSettings(websiteUrl, urlParameters);
var document = new HtmlToPdfDocument
{
GlobalSettings = globalSettings
};
document.Objects.Add(objectSettings);
CreateEventLog.CreateInformationLog("Ready to convert PDF");
result = Converter.Convert(document);
CreateEventLog.CreateInformationLog(result == null
? "Conversion failed using the Pechkin library"
: "PDF conversion finished");

I run this code in 3 different environments:

  • On my local machine it runs fine and it generates the file in 3 seconds.
  • On one of my servers (let's call it Server A) it runs fine and it generates the file in 3 seconds.
  • On the other of my servers (let's call it Server B) it holds for 1min (for some reason I don't understand) during the Converter.Convert part, and after that minute it returns null.

Server A and Server B have the same setup (CPU, RAM, etc)
There's no peak increase on Server B during conversion.

Any suggestions/ideas?

@jackiemanzzz
Copy link

Did you try without AnyCpu dll? I faced to similar problem when installed AnyCpu dll. So that, I changed my .dll from AnyCpu to x86 dll

@merdonalds
Copy link
Author

I found what the issue is.

The URL I'm trying to convert is in a Presentation Layer, which is deployed in a separate server. Pechkin converter is in a Business Layer.

In Server A, I can access the URL from the Business Server.
In Server B, I cannot access the URL from the Business Server.

This is probably some firewall exception that needs to be created.

It would be nice though to have TuesPechkin, returning an error saying it cannot access the URL.

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

2 participants