Re: [ACFUG Discuss] cfloop query - whats best include page vs cfhttp

2011-03-25 Thread Ajas Mohammed
Thanks all.

here is how I am using it now

Pseudo code:



 instead of 



Teddy, that should work the way you mentioned right, i.e. the processing of
one document will complete and cfloop with go to next record returned by
query and so on. I am just hoping the variables etc dont get messed up
between calls but I am thinking I should be fine because I am the only one
calling this page.



http://ajashadi.blogspot.com
We cannot become what we need to be, remaining what we are.
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
Quality is never an accident; it is always the result of high intention,
sincere effort, intelligent direction and skillful execution; it represents
the wise choice of many alternatives.


On Thu, Mar 17, 2011 at 5:33 PM, Dawn Hoagland wrote:

> I've written something similar to this to schedule processes and make sure
> we aren't killing the server during batch runs by running too many processes
> in parallel.  If there's a process to run, I invoke a component to run the
> process.  The component updates the db to show it is running.  This is all
> controlled by a background process that watches a file that is "touched"
> whenever a process is added to the table.
>
> FWIW - I'd also stay away from cfhttp if possible - especially if these
> reports are in any way critical.  It's finicky - and if everything is on the
> same server, there's really no reason I can think of (although there may be
> one I haven't thought of) to use it.
>
>
> 
> 
> 
>
> 
>
>  method="methodToRun" returnVariable="results">
> 
> 
> 
>
>   
>   
>
>   
> 
>
>
> On Thu, Mar 17, 2011 at 5:09 PM, Teddy R. Payne wrote:
>
>> Ajas,
>> Whether you use cfhttp or not, you can use cfthread to make sure a
>> dependency order exists.  With cfthread, you probably would not need a
>> sleep if set it up that the next thread cannot start until the first
>> one finishes.
>>
>> I have not tried to just create a loop of threads over and over.  I am
>> sure it would work, but you would have to look at the how long each
>> thread takes versus how many iterations of your loop and test the
>> performance around your approach.  I favor threads for predictable
>> number of executions or some sort of one-off parallel execution.
>>
>> If you put the document creation logic in a UDF or CFC, loop around
>> the function call as the function call will have to complete before
>> the next loop starts.  Otherwise, you will either need a sleep() or
>> some programmatic approach that will indicate when a document creation
>> has been completed before the next iteration of document creation.
>>
>> Pseudo code:
>>
>> 
>>
>> 
>>
>> 
>>
>> Hopefully that answered some portion of your question.
>>
>>
>> Teddy R. Payne, ACCFD
>> Google Talk - teddyrpa...@gmail.com
>>
>>
>>
>>
>> On Thu, Mar 17, 2011 at 3:53 PM, Ajas Mohammed 
>> wrote:
>> > Teddy,
>> >
>> > The logic and cfpdf/cfdocument stuff is already in place i.e. on the
>> page
>> > that needs to be called. I was thinking for 3 records returned,
>> cfinclude
>> > would mean, create pdf, sleep, then create pdf, sleep, and finally
>> create
>> > 3rd pdf. Whereas if I do cfhttp, it will 3 separate processes or can I
>> call
>> > it threads, iam not sure, so, http://ip addr/test/doThis.cfm for 1st
>> record,
>> > sleep, then another http://ip addr/test/doThis.cfm, sleep, and final
>> 3rd
>> > call http://ip addr/test/doThis.cfm.
>> >
>> > So which method is better?
>> >
>> > 
>> > http://ajashadi.blogspot.com
>> > We cannot become what we need to be, remaining what we are.
>> > No matter what, find a way. Because thats what winners do.
>> > You can't improve what you don't measure.
>> > Quality is never an accident; it is always the result of high intention,
>> > sincere effort, intelligent direction and skillful execution; it
>> represents
>> > the wise choice of many alternatives.
>> >
>> >
>> > On Thu, Mar 17, 2011 at 3:43 PM, Teddy R. Payne 
>> > wrote:
>> >>
>> >> Ajas,
>> >> You can probably just  or  for your document
>> >> creation after you save the content of each query loop and create
>> >> whatever display logic you need.
>> >>
>> >> As far as making aquery execute longer, try the sleep() function or
>> >> using cfthread with the sleep action.
>> >>
>> >>
>> >> Teddy R. Payne, ACCFD
>> >> Google Talk - teddyrpa...@gmail.com
>> >>
>> >>
>> >>
>> >>
>> >> On Thu, Mar 17, 2011 at 3:37 PM, Ajas Mohammed 
>> wrote:
>> >> > Hi,
>> >> >
>> >> > I am thinking of a CF schedule night 2 am job which will basically
>> >> > create a
>> >> > pdf based of query data.
>> >> >
>> >> > So first  then  and then
>> question
>> >> > is
>> >> > do i want to include this pdf creation page by using cfinclude or do
>> I
>> >> > use
>> >> > cfhttp call.
>> >> >
>> >> > Also, I would like a sleep call between first record and every
>> >> > subsequent
>> >> > record returned by query. So

RE: [ACFUG Discuss] Weird CF 9 behaviour tied to DB/DSN (DB is read only)

2011-03-25 Thread Charlie Arehart
Hey Ajas, yes, I only mentioned FR because I knew you used it on at least
some servers. Yes, you can get the same stack trace with the Server Monitor
(though not the Multiserver Monitor, as that presents only a subset of the
former, albeit as viewed across several servers/instances at once.)

Even then, though, be aware that you need to enable "start monitoring" and
"start profiling" in the CF Server Monitor to see the stack trace for any
running request (it appears in the middle of the detail page when you
double-click a running request.) You can also see it using the "snapshot"
feature, though that instead is a thread dump of all running threads, not
just the one of interest, so takes a little more effort to work through.

As for the spinning page being the Admin, again, that doesn't really matter.
Yes, it's just a cfm request so it can be monitored using these tools. That
said, another benefit of FR is that it will show you CF Admin pages by
default, but the CF Server Monitor intentionally hides them, so you need to
go into the settings for the monitor and tell it to show the Admin pages.

 

/charlie

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Ajas Mohammed
Sent: Friday, March 25, 2011 9:27 AM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] Weird CF 9 behaviour tied to DB/DSN (DB is read
only)

 

Great point Charlie. On this BACKUP/DR Server, I do not have FR. But this is
Enterprise License and we have other box with Ent License. So I guess I can
use the MultiServer Monitor on the working CF9 server and use it to Monitor
this CF9 BACKUP/DR Server. Do you think thats a good approach or just have
FR to see what is going on.

As for the spinning requests, its the CF ADMINISTRATOR page that spins and
doesnt even show login screen, as well as any site page, that keep spinning
as well and I guess you meant FR will show either of them because for FR its
still a cfm request. :-)

I will update with my findings soon.


http://ajashadi.blogspot.com
We cannot become what we need to be, remaining what we are.
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
Quality is never an accident; it is always the result of high intention,
sincere effort, intelligent direction and skillful execution; it represents
the wise choice of many alternatives.



On Fri, Mar 25, 2011 at 12:11 AM, Charlie Arehart 
wrote:

Ajas, you have FusionReactor, don't you? When you have one of these
"spinning" requests, what does a stack trace of the running request show it
doing? It will tell you the very line of CFML on which the request is hung
up, so you should be able to find the answer-and do let us know. It sounds
interesting. :-)

 

/charlie

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Ajas Mohammed
Sent: Thursday, March 24, 2011 5:28 PM
To: discussion@acfug.org
Subject: [ACFUG Discuss] Weird CF 9 behaviour tied to DB/DSN (DB is read
only)

 

Hi,

We had the weirdest of errors today. On one of our test CF 9 Servers, we
tried to start CF admin and the browser would just keep processing. We tried
to access a site same problem.

So it struck to me, why dont I look at logs first and sure indeed in
exception log, there was an entry saying couldnt get to Database XYZ.
Speaking of database, all the databases we had were set to read-only
mode(long story). So I told our dba, bring all those DB's up and running. 

Surely, as soon as He brought up all DB's, CF 9 admin showed up fine. Now
just as a test, we removed the user account (from SQL DB) that we used to
create DSN for another db ABC. We restarted CF 9 and tried to access
administrator and again it would not show up.

Has anyone seen this before? Why would CF Admin wont show up if database is
not up and running? Any thoughts on this?


http://ajashadi.blogspot.com
We cannot become what we need to be, remaining what we are.
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
Quality is never an accident; it is always the result of high intention,
sincere effort, intelligent direction and skillful execution; it represents
the wise choice of many alternatives.


- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink   
- 

 




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-



RE: [ACFUG Discuss] error trap emails -- html format for gmail?

2011-03-25 Thread Charlie Arehart
Thanks for the kind regards, Steve. It's just always been my thing to have a
memory for such details, not just with CF but in my prior IT career (82-97).


It's of course what helps fuel my articles, presos, and answers on
lists/forums. I like giving back when I can, because I have learned so much
from others. And now I leverage that recall as well in my troubleshooting
consulting, which I love doing.

As for the capacity to remember stuff, for those curious, it seems really to
go back to childhood. Some will remember the "Encyclopedia Brown" book
series. Well, kids used to make fun of me referring to that, but I regarded
it more as a compliment. :-)

/charlie

PS As a fellow Christian, Steve, you (and many others on this list) will
appreciate that I realize and indeed hope that God would use such a gift as
he's given me for His glory, whether it's by my being able to have the same
recall of key parts of the bible, or theology, history, and so on, and
whether for teaching fellow believers, for apologetics, and so on. I hope
those antagonistic toward faith will just let this pass. I'm not "forcing"
my beliefs on you here in this little PS. :-)

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Steve Ross
Sent: Friday, March 25, 2011 8:46 AM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] error trap emails -- html format for gmail?

 

Thanks charlie, I'll update that on my side... how you remember all this
stuff I'll never know. ;)

On Thu, Mar 24, 2011 at 11:59 PM, Charlie Arehart 
wrote:

Hey Steve, if you were on CF8 or above, the easiest solution would be the
new FORMAT="text" attribute for CFDUMP. (And I share this for others who may
have the same problem and ARE on 8 or above and didn't notice this little
hidden gem, one of a few changes for CFDUMP since then.)

But since you're on 7, here's another fairly simple idea: just do a CFLOOP
over the cferror/cfcatch struct and do a cfoutput of each key (at least
those that are simple values, which you can test with issimplevalue). You
could try to recurse through arrays and dumps and dump their simple values. 

There are also various UDFs written in the CFLIB site that seem to do the
same thing, such as: http://www.cflib.org/udf/dumpVarList. Just do a search
there for "dump", and you may find one that does just what you want.

Hope that helps.

/charlie




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-



Re: [ACFUG Discuss] Weird CF 9 behaviour tied to DB/DSN (DB is read only)

2011-03-25 Thread Ajas Mohammed
Great point Charlie. On this BACKUP/DR Server, I do not have FR. But this is
Enterprise License and we have other box with Ent License. So I guess I can
use the MultiServer Monitor on the working CF9 server and use it to Monitor
this CF9 BACKUP/DR Server. Do you think thats a good approach or just have
FR to see what is going on.

As for the spinning requests, its the CF ADMINISTRATOR page that spins and
doesnt even show login screen, as well as any site page, that keep spinning
as well and I guess you meant FR will show either of them because for FR its
still a cfm request. :-)

I will update with my findings soon.


http://ajashadi.blogspot.com
We cannot become what we need to be, remaining what we are.
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
Quality is never an accident; it is always the result of high intention,
sincere effort, intelligent direction and skillful execution; it represents
the wise choice of many alternatives.


On Fri, Mar 25, 2011 at 12:11 AM, Charlie Arehart wrote:

> Ajas, you have FusionReactor, don’t you? When you have one of these
> “spinning” requests, what does a stack trace of the running request show it
> doing? It will tell you the very line of CFML on which the request is hung
> up, so you should be able to find the answer—and do let us know. It sounds
> interesting. :-)
>
>
>
> /charlie
>
>
>
> *From:* ad...@acfug.org [mailto:ad...@acfug.org] *On Behalf Of *Ajas
> Mohammed
> *Sent:* Thursday, March 24, 2011 5:28 PM
> *To:* discussion@acfug.org
> *Subject:* [ACFUG Discuss] Weird CF 9 behaviour tied to DB/DSN (DB is read
> only)
>
>
>
> Hi,
>
> We had the weirdest of errors today. On one of our test CF 9 Servers, we
> tried to start CF admin and the browser would just keep processing. We tried
> to access a site same problem.
>
> So it struck to me, why dont I look at logs first and sure indeed in
> exception log, there was an entry saying couldnt get to Database XYZ.
> Speaking of database, all the databases we had were set to read-only
> mode(long story). So I told our dba, bring all those DB's up and running.
>
> Surely, as soon as He brought up all DB's, CF 9 admin showed up fine. Now
> just as a test, we removed the user account (from SQL DB) that we used to
> create DSN for another db ABC. We restarted CF 9 and tried to access
> administrator and again it would not show up.
>
> Has anyone seen this before? Why would CF Admin wont show up if database is
> not up and running? Any thoughts on this?
>
> 
> http://ajashadi.blogspot.com
> We cannot become what we need to be, remaining what we are.
> No matter what, find a way. Because thats what winners do.
> You can't improve what you don't measure.
> Quality is never an accident; it is always the result of high intention,
> sincere effort, intelligent direction and skillful execution; it represents
> the wise choice of many alternatives.
>
> -
> To unsubscribe from this list, manage your profile @
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists
> Archive @ http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by FusionLink 
> -


Re: [ACFUG Discuss] error trap emails -- html format for gmail?

2011-03-25 Thread Steve Ross
Thanks charlie, I'll update that on my side... how you remember all this
stuff I'll never know. ;)

On Thu, Mar 24, 2011 at 11:59 PM, Charlie Arehart wrote:

> Hey Steve, if you were on CF8 or above, the easiest solution would be the
> new FORMAT=”text” attribute for CFDUMP. (And I share this for others who may
> have the same problem and ARE on 8 or above and didn’t notice this little
> hidden gem, one of a few changes for CFDUMP since then.)
>
> But since you’re on 7, here’s another fairly simple idea: just do a CFLOOP
> over the cferror/cfcatch struct and do a cfoutput of each key (at least
> those that are simple values, which you can test with issimplevalue). You
> could try to recurse through arrays and dumps and dump their simple values.
>
> There are also various UDFs written in the CFLIB site that seem to do the
> same thing, such as: http://www.cflib.org/udf/dumpVarList. Just do a
> search there for “dump”, and you may find one that does just what you want.
>
> Hope that helps.
>
>
>
> /charlie
>
>
>
> *From:* ad...@acfug.org [mailto:ad...@acfug.org] *On Behalf Of *Steven
> *Sent:* Thursday, March 24, 2011 12:43 PM
> *To:* discussion@acfug.org
> *Cc:* Steve Ross
> *Subject:* Re: [ACFUG Discuss] error trap emails -- html format for gmail?
>
>
>
> Thx all.. for the feedback. HTML attrib on cfmail is in use.. google just
> doesn't like what cfdump is doing.
>
> To SR.. yeah, I'm doing the fixed log file route as well. Thinking about
> just attaching it.. but kinda messy and don't want the extra file maint.
>
>
>
> And I did read Nadel's article -- but on this server I'm stuck with cfmx7
> and no content attrib in cfmailparam :P.  Ah well, done with this rabbit
> trail. Back to coffee and the day's work ;)
>
>
>
> Hope everyone is having a decent Thurs. TGIT.
>
>
>
> -Steve
>
>
>
>
>
> On Thu, Mar 24, 2011 at 11:55 AM, Steve Ross  wrote:
>
> I am doing the same thing and the dump gets screwed up in gmail because of
> how they process mail. The "solution" I came up with was to write the dump
> in a log file on the machine so then I can just go into that directory and
> double click on the "email.html" file. Kind of a kludge but, it works.
>
>
>
> the other solution would be to attach the contents as html as well...
>
>
>
> ie:
> http://www.bennadel.com/blog/1649-Attaching-ColdFusion-Error-Reports-To-Avoid-GMail-Spam.htm
>
>
>
>
>
> On Thu, Mar 24, 2011 at 11:12 AM, Ken Auenson, II 
> wrote:
>
> Steven,
> You need to add type="HTML" to your cfmail tag.
>
> --Ken
>
> On Mar 24, 2011 9:54 AM, "Steven"  wrote:
> > Hey all,
> > We do some error trapping via email for one of our apps, and the
> formatting
> > doesn't come over quite right for gmail. We're just dumping out the error
> > struct in a cfmail of type html. Anyone run into this and have a
> workround
> > for gmail? Something in the html output isn't quite right for gmail. I
> know
> > it's a picky, pet-peevy thing.. :P but I haven't had enough coffee yet
> this
> > morn, and this silly formatting issue is bothering me.
> >
> > See screenshot of what I'm talking about at:
> > http://blueboltservers.com/error_trapping.jpg
> > (biz gmail on left, owa on right)
> >
> > Thx.
> >
> > -Steve
>
>
>
>
> --
> Steve Ross
> web application & interface developer
> http://blog.stevensross.com
> [mobile] (912) 344-8113
> [ AIM / Yahoo! : zeriumsteven ] [googleTalk : nowhiding ]
>
>
>
> -
> To unsubscribe from this list, manage your profile @
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists
> Archive @ http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by FusionLink 
> -
>



-- 
Steve Ross
web application & interface developer
http://blog.stevensross.com
[mobile] (912) 344-8113
[ AIM / Yahoo! : zeriumsteven ] [googleTalk : nowhiding ]