[LP8.6/Win] Image tag problem with PDFs

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[LP8.6/Win] Image tag problem with PDFs

Jon Harris
Hi List

For a long time we have been uploading PDFs to our site, we use the image tag to create a thumbnail of the pdf. Up to now, this has been working fine.

This is the actual command line - although it's nothing special.

var('thePDF') = Image($path + $OriginalName);

We have tried uploading just a 6Mb file and after a minute or so we get.

"Lasso Connector could not communicate with Lasso Service.
Connection timed out."

The special thing about this particular PDF is that it's over 400 pages long.

Looking at c:\windows\temp on the server, we can see imagemagick creating hundreds of files. When its finished (timed-out), the file suddenly disappear.

My theory is that imagemagick  is thumbnail-ing each page, then eventually timing out. It actually seems to nearly finish, so I put

Lasso_ExecutionTimeLimit: 0 ;

- as the first line in my .lasso file, but it made no difference whatsoever, in fact I don't think "Lasso_ExecutionTimeLimit" actually does anything.

Is there anything, I can do to either get it to thumbnail just the front cover, or get it to run a little longer?

Any help appreciated.

Jon


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: [LP8.6/Win] Image tag problem with PDFs

Trevor Borgmeier
Two quick thoughts.

1. Setting the [Lasso_ExecutionTimeLimit] to a reasonable value.
2. Extract the first page of the pdf using the pdf tags and then process
that for the screenshot instead.

-Trevor



on 6/12/13 10:59 AM Jon Harris wrote:

> Hi List
>
> For a long time we have been uploading PDFs to our site, we use the image tag to create a thumbnail of the pdf. Up to now, this has been working fine.
>
> This is the actual command line - although it's nothing special.
>
> var('thePDF') = Image($path + $OriginalName);
>
> We have tried uploading just a 6Mb file and after a minute or so we get.
>
> "Lasso Connector could not communicate with Lasso Service.
> Connection timed out."
>
> The special thing about this particular PDF is that it's over 400 pages long.
>
> Looking at c:\windows\temp on the server, we can see imagemagick creating hundreds of files. When its finished (timed-out), the file suddenly disappear.
>
> My theory is that imagemagick  is thumbnail-ing each page, then eventually timing out. It actually seems to nearly finish, so I put
>
> Lasso_ExecutionTimeLimit: 0 ;
>
> - as the first line in my .lasso file, but it made no difference whatsoever, in fact I don't think "Lasso_ExecutionTimeLimit" actually does anything.
>
> Is there anything, I can do to either get it to thumbnail just the front cover, or get it to run a little longer?
>
> Any help appreciated.
>
> Jon
>
>
> #############################################################
>
> Attend the Lasso Developer Conference 2013!
> Sept 12-14, 2013 in Niagara Falls, Canada
> http://www.lassosoft.com/LDC-niagara-falls-2013
>
> #############################################################
> This message is sent to you because you are subscribed to
>    the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

ɹǝıǝɯƃɹoq ɹoʌǝɹʇ


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

RE: [LP8.6/Win] Image tag problem with PDFs

Jon Harris
Hi Trevor

Thanks for your reply. I have tried a few different settings for Lasso_ExecutionTimeLimit, but it didn't seem to make any difference.

However, I think your second idea is a good one. We didn't actually realise this was happening until we started investigating this issue. We were just calling the image tag and an image came out. ("chickens go in and pies come out" :-) )

If you looked at the temp folder, before and after the process had run, you would not have suspected this was happening.

I'll let you know how I get on.

Regards
Jon


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Trevor Borgmeier
Sent: 12 June 2013 17:08
To: [hidden email]
Subject: Re: [LP8.6/Win] Image tag problem with PDFs

Two quick thoughts.

1. Setting the [Lasso_ExecutionTimeLimit] to a reasonable value.
2. Extract the first page of the pdf using the pdf tags and then process that for the screenshot instead.

-Trevor



on 6/12/13 10:59 AM Jon Harris wrote:

> Hi List
>
> For a long time we have been uploading PDFs to our site, we use the image tag to create a thumbnail of the pdf. Up to now, this has been working fine.
>
> This is the actual command line - although it's nothing special.
>
> var('thePDF') = Image($path + $OriginalName);
>
> We have tried uploading just a 6Mb file and after a minute or so we get.
>
> "Lasso Connector could not communicate with Lasso Service.
> Connection timed out."
>
> The special thing about this particular PDF is that it's over 400 pages long.
>
> Looking at c:\windows\temp on the server, we can see imagemagick creating hundreds of files. When its finished (timed-out), the file suddenly disappear.
>
> My theory is that imagemagick  is thumbnail-ing each page, then
> eventually timing out. It actually seems to nearly finish, so I put
>
> Lasso_ExecutionTimeLimit: 0 ;
>
> - as the first line in my .lasso file, but it made no difference whatsoever, in fact I don't think "Lasso_ExecutionTimeLimit" actually does anything.
>
> Is there anything, I can do to either get it to thumbnail just the front cover, or get it to run a little longer?
>
> Any help appreciated.
>
> Jon
>
>
> #############################################################
>
> Attend the Lasso Developer Conference 2013!
> Sept 12-14, 2013 in Niagara Falls, Canada
> http://www.lassosoft.com/LDC-niagara-falls-2013
>
> #############################################################
> This message is sent to you because you are subscribed to
>    the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

ɹǝıǝɯƃɹoq ɹoʌǝɹʇ


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>

#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: [LP8.6/Win] Image tag problem with PDFs

stevepiercy
In reply to this post by Trevor Borgmeier
In addition, is this IIS or Apache?  There are a couple of other
places to set timeouts for the server, too, which is what that
error indicates.  LassoTalk archive has some tips, but I'm too
lazy to do the search for you in Nabble.
http://lasso.2283332.n4.nabble.com/Lasso-Talk-f3096191.html

--steve


On 6/12/13 at 11:08 AM, [hidden email] (Trevor Borgmeier) pronounced:

>Two quick thoughts.
>
>1. Setting the [Lasso_ExecutionTimeLimit] to a reasonable value.
>2. Extract the first page of the pdf using the pdf tags and
>then process that for the screenshot instead.
>
>-Trevor
>
>
>
>on 6/12/13 10:59 AM Jon Harris wrote:
>>Hi List
>>
>>For a long time we have been uploading PDFs to our site, we use the image tag to create a thumbnail
>of the pdf. Up to now, this has been working fine.
>>
>>This is the actual command line - although it's nothing special.
>>
>>var('thePDF') = Image($path + $OriginalName);
>>
>>We have tried uploading just a 6Mb file and after a minute or so we get.
>>
>>"Lasso Connector could not communicate with Lasso Service.
>>Connection timed out."
>>
>>The special thing about this particular PDF is that it's over 400 pages long.
>>
>>Looking at c:\windows\temp on the server, we can see imagemagick creating hundreds of files. When
>its finished (timed-out), the file suddenly disappear.
>>
>>My theory is that imagemagick  is thumbnail-ing each page, then eventually timing out. It actually
>seems to nearly finish, so I put
>>
>>Lasso_ExecutionTimeLimit: 0 ;
>>
>>- as the first line in my .lasso file, but it made no difference whatsoever, in fact I don't think
>"Lasso_ExecutionTimeLimit" actually does anything.
>>
>>Is there anything, I can do to either get it to thumbnail just the front cover, or get it to run a
>little longer?
>>
>>Any help appreciated.
>>
>>Jon
>>
>>
>>#############################################################
>>
>>Attend the Lasso Developer Conference 2013!
>>Sept 12-14, 2013 in Niagara Falls, Canada
>>http://www.lassosoft.com/LDC-niagara-falls-2013
>>
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso
>>[hidden email]
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>>
>
>ɹǝıǝɯƃɹoq ɹoʌǝɹʇ
>
>
>#############################################################
>
>Attend the Lasso Developer Conference 2013!
>Sept 12-14, 2013 in Niagara Falls, Canada
>http://www.lassosoft.com/LDC-niagara-falls-2013
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

RE: [LP8.6/Win] Image tag problem with PDFs

Daniel Logue
I think Steve is onto it here - to me, this looks like a timeout between the Lasso8ConnectorForIIS.dll and Lasso.  The connector will only wait so long for Lasso to respond to it before it gives that error.  If you looked at the threads in Lasso Admin, you'd probably see it's still working away, but IIS/Lasso8ConnectorForIIS has stopped waiting for a response.  You can bump up that timeout by editing the Lasso8ISAPI.conf file and adding a timeout line.. something like this:

server 127.0.0.1
port 14552
timeout {integer in seconds}

Or, you can leave it the way it is and just code the user experience to account for a possible timeout.  I'd choose this path, because you never know how long it could take, right?  Maybe fire the URL via and ajax request, take the user to a 'loading page', then check to see if it is done with additional ajax requests.  Or you could figure out a way to make the initial job it faster, but I'm not going to comment on that :)

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Steve Piercy - Web Site Builder
Sent: Wednesday, June 12, 2013 12:56 PM
To: [hidden email]
Subject: Re: [LP8.6/Win] Image tag problem with PDFs

In addition, is this IIS or Apache?  There are a couple of other places to set timeouts for the server, too, which is what that error indicates.  LassoTalk archive has some tips, but I'm too lazy to do the search for you in Nabble.
http://lasso.2283332.n4.nabble.com/Lasso-Talk-f3096191.html

--steve


On 6/12/13 at 11:08 AM, [hidden email] (Trevor Borgmeier) pronounced:

>Two quick thoughts.
>
>1. Setting the [Lasso_ExecutionTimeLimit] to a reasonable value.
>2. Extract the first page of the pdf using the pdf tags and then
>process that for the screenshot instead.
>
>-Trevor
>
>
>
>on 6/12/13 10:59 AM Jon Harris wrote:
>>Hi List
>>
>>For a long time we have been uploading PDFs to our site, we use the
>>image tag to create a thumbnail
>of the pdf. Up to now, this has been working fine.
>>
>>This is the actual command line - although it's nothing special.
>>
>>var('thePDF') = Image($path + $OriginalName);
>>
>>We have tried uploading just a 6Mb file and after a minute or so we get.
>>
>>"Lasso Connector could not communicate with Lasso Service.
>>Connection timed out."
>>
>>The special thing about this particular PDF is that it's over 400 pages long.
>>
>>Looking at c:\windows\temp on the server, we can see imagemagick
>>creating hundreds of files. When
>its finished (timed-out), the file suddenly disappear.
>>
>>My theory is that imagemagick  is thumbnail-ing each page, then
>>eventually timing out. It actually
>seems to nearly finish, so I put
>>
>>Lasso_ExecutionTimeLimit: 0 ;
>>
>>- as the first line in my .lasso file, but it made no difference
>>whatsoever, in fact I don't think
>"Lasso_ExecutionTimeLimit" actually does anything.
>>
>>Is there anything, I can do to either get it to thumbnail just the
>>front cover, or get it to run a
>little longer?
>>
>>Any help appreciated.
>>
>>Jon
>>
>>
>>#############################################################
>>
>>Attend the Lasso Developer Conference 2013!
>>Sept 12-14, 2013 in Niagara Falls, Canada
>>http://www.lassosoft.com/LDC-niagara-falls-2013
>>
>>#############################################################
>>This message is sent to you because you are subscribed to the mailing
>>list Lasso [hidden email] To unsubscribe, E-mail to:
>><[hidden email]>
>>Send administrative queries to  <[hidden email]>
>>
>
>ɹǝıǝɯƃɹoq ɹoʌǝɹʇ
>
>
>#############################################################
>
>Attend the Lasso Developer Conference 2013!
>Sept 12-14, 2013 in Niagara Falls, Canada
>http://www.lassosoft.com/LDC-niagara-falls-2013
>
>#############################################################
>This message is sent to you because you are subscribed to the mailing
>list Lasso [hidden email] To unsubscribe, E-mail to:
><[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>

#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

RE: [LP8.6/Win] Image tag problem with PDFs

Jon Harris
Hi Guys

Thanks for the pointers, it looks like the "Lasso8ISAPI.conf" timeout has fixed the issue. So it was the IIS connector timing out issue.

However, I will be taking Trevor's advice and I'll see if I can slice off  the top sheet and thumbnail that. It's an interesting issue, if I hadn't been watching the temp folder, I'd have never know that’s what it was doing.

Regards
Jon


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Daniel Logue
Sent: 12 June 2013 21:11
To: '[hidden email]'
Subject: RE: [LP8.6/Win] Image tag problem with PDFs

I think Steve is onto it here - to me, this looks like a timeout between the Lasso8ConnectorForIIS.dll and Lasso.  The connector will only wait so long for Lasso to respond to it before it gives that error.  If you looked at the threads in Lasso Admin, you'd probably see it's still working away, but IIS/Lasso8ConnectorForIIS has stopped waiting for a response.  You can bump up that timeout by editing the Lasso8ISAPI.conf file and adding a timeout line.. something like this:

server 127.0.0.1
port 14552
timeout {integer in seconds}

Or, you can leave it the way it is and just code the user experience to account for a possible timeout.  I'd choose this path, because you never know how long it could take, right?  Maybe fire the URL via and ajax request, take the user to a 'loading page', then check to see if it is done with additional ajax requests.  Or you could figure out a way to make the initial job it faster, but I'm not going to comment on that :)

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Steve Piercy - Web Site Builder
Sent: Wednesday, June 12, 2013 12:56 PM
To: [hidden email]
Subject: Re: [LP8.6/Win] Image tag problem with PDFs

In addition, is this IIS or Apache?  There are a couple of other places to set timeouts for the server, too, which is what that error indicates.  LassoTalk archive has some tips, but I'm too lazy to do the search for you in Nabble.
http://lasso.2283332.n4.nabble.com/Lasso-Talk-f3096191.html

--steve


On 6/12/13 at 11:08 AM, [hidden email] (Trevor Borgmeier) pronounced:

>Two quick thoughts.
>
>1. Setting the [Lasso_ExecutionTimeLimit] to a reasonable value.
>2. Extract the first page of the pdf using the pdf tags and then
>process that for the screenshot instead.
>
>-Trevor
>
>
>
>on 6/12/13 10:59 AM Jon Harris wrote:
>>Hi List
>>
>>For a long time we have been uploading PDFs to our site, we use the
>>image tag to create a thumbnail
>of the pdf. Up to now, this has been working fine.
>>
>>This is the actual command line - although it's nothing special.
>>
>>var('thePDF') = Image($path + $OriginalName);
>>
>>We have tried uploading just a 6Mb file and after a minute or so we get.
>>
>>"Lasso Connector could not communicate with Lasso Service.
>>Connection timed out."
>>
>>The special thing about this particular PDF is that it's over 400 pages long.
>>
>>Looking at c:\windows\temp on the server, we can see imagemagick
>>creating hundreds of files. When
>its finished (timed-out), the file suddenly disappear.
>>
>>My theory is that imagemagick  is thumbnail-ing each page, then
>>eventually timing out. It actually
>seems to nearly finish, so I put
>>
>>Lasso_ExecutionTimeLimit: 0 ;
>>
>>- as the first line in my .lasso file, but it made no difference
>>whatsoever, in fact I don't think
>"Lasso_ExecutionTimeLimit" actually does anything.
>>
>>Is there anything, I can do to either get it to thumbnail just the
>>front cover, or get it to run a
>little longer?
>>
>>Any help appreciated.
>>
>>Jon
>>
>>
>>#############################################################
>>
>>Attend the Lasso Developer Conference 2013!
>>Sept 12-14, 2013 in Niagara Falls, Canada
>>http://www.lassosoft.com/LDC-niagara-falls-2013
>>
>>#############################################################
>>This message is sent to you because you are subscribed to the mailing
>>list Lasso [hidden email] To unsubscribe, E-mail to:
>><[hidden email]>
>>Send administrative queries to  <[hidden email]>
>>
>
>ɹǝıǝɯƃɹoq ɹoʌǝɹʇ
>
>
>#############################################################
>
>Attend the Lasso Developer Conference 2013!
>Sept 12-14, 2013 in Niagara Falls, Canada
>http://www.lassosoft.com/LDC-niagara-falls-2013
>
>#############################################################
>This message is sent to you because you are subscribed to the mailing
>list Lasso [hidden email] To unsubscribe, E-mail to:
><[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>

#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>

#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>