debugging suggestions

View: New views
8 Messages — Rating Filter:   Alert me  

debugging suggestions

by Jay Sprenkle :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Good morning all,
I'm developing a cgicc fastcgi application. I can serve regular html
pages just fine but when I try to do AJAX stuff it blows chunks
(that's a technical term). I'm using IIS with the fastcgi dll for
testing. My code is simple. I create a new httpresponse header and
populate it with '204' and 'No Content'. I send it and a text/plain
header. It looks like it matches the http 1.0
spec but I keep getting 500 errors from IIS. Any suggestions?

--
--
The PixAddixImage Collector suite:
http://groups-beta.google.com/group/pixaddix

SqliteImporter and SqliteReplicator: Command line utilities for Sqlite
http://www.reddawn.net/~jsprenkl/Sqlite

Cthulhu Bucks!
http://www.cthulhubucks.com


_______________________________________________
help-cgicc mailing list
help-cgicc@...
http://lists.gnu.org/mailman/listinfo/help-cgicc

Re: debugging suggestions

by Allan Wind :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2008-08-22T08:09:30, Jay Sprenkle wrote:
> I'm developing a cgicc fastcgi application. I can serve regular html
> pages just fine but when I try to do AJAX stuff it blows chunks
> (that's a technical term). I'm using IIS with the fastcgi dll for
> testing. My code is simple. I create a new httpresponse header and
> populate it with '204' and 'No Content'. I send it and a text/plain
> header. It looks like it matches the http 1.0
> spec but I keep getting 500 errors from IIS. Any suggestions?

You are giving enough context for anyone to help you.

If you have something working A, and something that is not working B,
one basic troubleshooting technique is to iteratively change the former
into the latter.  Test after each change to narrow down what is
breaking.  I have not used IIS, but with Apache I would look in the
errors logs so what is going on.


/Allan
--
Allan Wind
Life Integrity, LLC
http://lifeintegrity.com



_______________________________________________
help-cgicc mailing list
help-cgicc@...
http://lists.gnu.org/mailman/listinfo/help-cgicc

Parent Message unknown Re: debugging suggestions

by Igor-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Jay,

Friday, August 22, 2008, 5:09:30 PM, you wrote:

JS> I'm developing a cgicc fastcgi application. I can serve regular html
JS> pages just fine but when I try to do AJAX stuff it blows chunks
JS> (that's a technical term). I'm using IIS with the fastcgi dll for
JS> testing. My code is simple. I create a new httpresponse header and
JS> populate it with '204' and 'No Content'. I send it and a text/plain
JS> header. It looks like it matches the http 1.0
JS> spec but I keep getting 500 errors from IIS.

    check out:
   
    * IIS logs
    * you're actually sending HTTP response in AJAX mode to cout
    * there is no other text that has been sent to cout before you
      sent HTTP header
    * your streams are rerouted to FastCGI handler
    * fastcgi.dll is in path and could be loaded by your fcgi app at
      runtime
    * cgicc.dll is in path and could be loaded by your fcgi app at
      runtime
    * you have the same threading model for fastcgi.dll, cgicc.dll and
      your app, it should be Multithreaded
    * there is such a remarkable thing under windows|Visual Studio as
      DebugBreak() - use it

    well if everything fails then you might have forgotten about fcgi
    loop


--
Best regards,
 Igor                            mailto:sprog@...



_______________________________________________
help-cgicc mailing list
help-cgicc@...
http://lists.gnu.org/mailman/listinfo/help-cgicc

Re: debugging suggestions

by Jay Sprenkle :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Aug 22, 2008 at 1:59 PM, Allan Wind
<allan_wind@...> wrote:
> You are giving enough context for anyone to help you.

I believe you left out 'not'?

>
> If you have something working A, and something that is not working B,
> one basic troubleshooting technique is to iteratively change the former
> into the latter.  Test after each change to narrow down what is
> breaking.  I have not used IIS, but with Apache I would look in the
> errors logs so what is going on.

The logging for IIS seems to be pretty non existent. I was unable to find
anything in the error logs.

Thanks for trying to help though.


_______________________________________________
help-cgicc mailing list
help-cgicc@...
http://lists.gnu.org/mailman/listinfo/help-cgicc

Re: debugging suggestions

by Allan Wind :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2008-08-22T18:06:24, Jay Sprenkle wrote:
> On Fri, Aug 22, 2008 at 1:59 PM, Allan Wind
> <allan_wind@...> wrote:
> > You are giving enough context for anyone to help you.
>
> I believe you left out 'not'?

Indeed.

> > If you have something working A, and something that is not working B,
> > one basic troubleshooting technique is to iteratively change the former
> > into the latter.  Test after each change to narrow down what is
> > breaking.  I have not used IIS, but with Apache I would look in the
> > errors logs so what is going on.
>
> The logging for IIS seems to be pretty non existent. I was unable to find
> anything in the error logs.

If you used fastcgi's cgi compatibility layer, then try complete the
script as CGI and run it by hand.  Compare output with working script.


/Allan
--
Allan Wind
Life Integrity, LLC
http://lifeintegrity.com



_______________________________________________
help-cgicc mailing list
help-cgicc@...
http://lists.gnu.org/mailman/listinfo/help-cgicc

Re: debugging suggestions

by Allan Wind :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2008-08-22T20:16:20, Allan Wind wrote:
> If you used fastcgi's cgi compatibility layer, then try complete the
> script as CGI and run it by hand.  Compare output with working script.

s/complete/compile/


/Allan
--
Allan Wind
Life Integrity, LLC
http://lifeintegrity.com



_______________________________________________
help-cgicc mailing list
help-cgicc@...
http://lists.gnu.org/mailman/listinfo/help-cgicc

Re: debugging suggestions

by Jay Sprenkle :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Aug 22, 2008 at 7:16 PM, Allan Wind
<allan_wind@...> wrote:
> If you used fastcgi's cgi compatibility layer, then try complete the
> script as CGI and run it by hand.  Compare output with working script.

It's written as a fastcgi program, so I didn't use the compatibility layer.
I'm thinking the problem is IIS 5.x just won't do that from what I'm
reading about it.


_______________________________________________
help-cgicc mailing list
help-cgicc@...
http://lists.gnu.org/mailman/listinfo/help-cgicc

Parent Message unknown Re[2]: debugging suggestions

by Igor-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Jay,

Saturday, August 23, 2008, 3:18:06 AM, you wrote:

>>    * you're actually sending HTTP response in AJAX mode to cout
>>    * there is no other text that has been sent to cout before you
>>      sent HTTP header
>>    * your streams are rerouted to FastCGI handler
>>    * fastcgi.dll is in path and could be loaded by your fcgi app at
>>      runtime
>>    * cgicc.dll is in path and could be loaded by your fcgi app at
>>      runtime

JS> The only time I get an error seems to be when I include a response
JS> header. By that I mean:

JS> this does NOT work (for any content type I tried)
JS> HTTP/1.0 200 OK
JS> Content-Type: text/html
JS> ..snip..

    virtual void render(std::ostream& out) const;

    unless you're wrong in passing standard (not fcgi) stream into this
    function you might check out that the reason (OK) is set and that
    you're sending HTTP/1.1 not HTTP/1.0, as far as I remember ISS
    doesn't like 1.0 in protocol version. (it doesn't support it, just
    a guess)

JS> This does work:
JS> Content-Type: text/html
JS> ..snip..

    It might be because you do not specify protocol version and by
    default it is HTTP/1.1

JS> A bit of googling turned up multiple complaints about IIS 5.x
JS> not being able to parse http headers that include the response
JS> code.

JS> How do you communicate the http response code to the web
JS> server using cgicc if not through header text?

    You might set it via HTTP header or via configs of HTTP server modules.
    The most common way is to set it via HTTP header (what you're
    trying to do)

>>    * there is such a remarkable thing under windows|Visual Studio as
>>      DebugBreak() - use it

JS> I'll have to look that up. I assume that's something to cause an
JS> interactive debugging breakpoint? How do you use a break point for a process that times out while
JS> you're stepping through it and is started by the web server not your debugger?

    When you use it the question will explain itself. DebugBreak() is a
    way how the services are debugged, a very useful, powerful, easy
    to use way etc.

JS> Never learned about it in the first place... Something else to google.

  while(FCGX_Accept_r(&request) == 0) {
  }

  FastCGI is a kind of design strategy, contrary to CGI it turns your app
  into a daemon/service. Depending on experience you might benefit a lot
  from that. But remember - your CGI app is no longer one timer, it will
  last as a service|daemon therefore a novice will have to fight for
  some time with possible variable stack|memory leaks.

  There is a similar native technology for IIS that is called ISAPI. I'm
  not sure weather ISAPI has a built in load balancer or how ISAPI is
  synchronizing the threads.
 
--

Best regards,
 Igor                            mailto:sprog@...



_______________________________________________
help-cgicc mailing list
help-cgicc@...
http://lists.gnu.org/mailman/listinfo/help-cgicc