 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Keith Marbach Guest
|
Posted: Thu May 10, 2007 8:20 pm Post subject: ISAPI DLL accessing SQL database / sporadic |
|
|
I have an ISAPI dll written using Delphi 6 that reads image data from a SQL
database and creates thumbnails on the fly, returning thumbnails to the web
server. This works, except that 1 out of 2 or 1 out of 3 thumbnail images do
not come accross correctly... Say I have a page that should have 20
thumbnails. This generates 20 calls to the DLL. 12 or so of the thumbnails
will be okay, the others will show up with red X in white box.
We recently upgraded our web server. Before the upgrade we would get 18-20
good thumbnails out of 20, so I did not worry too much about the problem.
My guess is something is overloading and some requests are being tossed
aside, either by the DB or by the DLL. Any thoughts to fix are appreciated.
Keith |
|
| Back to top |
|
 |
Mark Horrocks Guest
|
Posted: Fri May 11, 2007 5:11 am Post subject: Re: ISAPI DLL accessing SQL database / sporadic |
|
|
| Quote: | We recently upgraded our web server. Before the upgrade we would get 18-20
good thumbnails out of 20, so I did not worry too much about the problem.
Are your transactions being committed? |
|
|
| Back to top |
|
 |
Keith Marbach Guest
|
Posted: Fri May 11, 2007 6:33 pm Post subject: Re: ISAPI DLL accessing SQL database / sporadic |
|
|
A warning up front... I might ask some stupid questions...
If you're talking about SQL commits, these are read operations only. If
you're talking about something else please explain.
This ISAPI dll was my first attempt at such a thing... is there a good
document that discusses how to do such a thing? I followed the basic
directions offered by D6 for creating an ISAPI dll, but I am concerned that
I am not managing memory properly somehow. The dll works great for single
requests for thumbnails, but fails when asked for numerous requests within a
single web page.
"Mark Horrocks" <markhorrocks_at_yahoo_dot_com> wrote in message
news:4643b4c3 (AT) newsgroups (DOT) borland.com...
| Quote: |
We recently upgraded our web server. Before the upgrade we would get
18-20
good thumbnails out of 20, so I did not worry too much about the problem.
Are your transactions being committed?
|
|
|
| Back to top |
|
 |
Del Murray Guest
|
Posted: Fri May 11, 2007 7:33 pm Post subject: Re: ISAPI DLL accessing SQL database / sporadic |
|
|
Keith,
I had exactly the same problem I stored the images in a database and then
the web page I built had links pointing back to the DLL for each image. When
the web page loaded and started to go back to the dll to allow the dll to
return the image, I got exactly the same behavior. Here is what I had to do
to cure it so that it worked 100% .. I cant explain why this made a
difference..
I put the images in an organized subdirectory as distinct image files as
well as storing them in a database.
When I generate the "thumbnail" screen, I created "<img" links pointing back
to the specific file. This was in contrast to spewing out all the thumbnails
in one big stream going to the browser. When the page loads, the browser
goes and fetches the file from the server and all is OK. This stands in
contrast to the old way of the browser going to the dll and letting the dll
return the file.
I think the difference is in the way the ip packets are being delivered back
to the browser. When you have a bunch of thumbnails, each one is coming in
interlaced with pieces of the others that are also being returned and I
think the browser just cant handle it. I spent hours in debug mode watching
the flow of data back to the browser and couldn't find any definite reason
for it not working. What I finally did works well 100% of the time and so I
was off to the next task and dont really care why anymore.
By keeping the image in the DB as well as a physical file, I can restore the
physical files from the DB in case of a crash since the DB is backed up a
couple times a day . That way I dont have to backup all the image files.
HTH
Del
"Keith Marbach" <keith (AT) cometsigns (DOT) com> wrote in message
news:464470b8$1 (AT) newsgroups (DOT) borland.com...
| Quote: | A warning up front... I might ask some stupid questions...
If you're talking about SQL commits, these are read operations only. If
you're talking about something else please explain.
This ISAPI dll was my first attempt at such a thing... is there a good
document that discusses how to do such a thing? I followed the basic
directions offered by D6 for creating an ISAPI dll, but I am concerned
that I am not managing memory properly somehow. The dll works great for
single requests for thumbnails, but fails when asked for numerous requests
within a single web page.
"Mark Horrocks" <markhorrocks_at_yahoo_dot_com> wrote in message
news:4643b4c3 (AT) newsgroups (DOT) borland.com...
We recently upgraded our web server. Before the upgrade we would get
18-20
good thumbnails out of 20, so I did not worry too much about the
problem.
Are your transactions being committed?
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|