Roberto De Ioris | 1 Jun 06:53 2011
Picon

Re: uwsgi.log


> Somehow I managed to generate a message length of 8178 characters, which I
> try to print using uwsgi.log() .
> Strange things are written.
>
>

uwsgi.log call uwsgi_log() c function.

It allocates 4k for log management, so 8178 bytes will not get into.

You can use "print" (for now) but i suppose i can make it more smart and
allocates memory on demand for bigger loglines.

--

-- 
Roberto De Ioris
http://unbit.it
Roberto De Ioris | 1 Jun 07:14 2011
Picon

Re: spooler buffer


> IMHO Spooler should throw an exception when trying to add a message longer
> than than buffer size.
> Nowadays is very easy to miss it. If someone does not read the
> documentation carefully it could lose some tasks not even knowing.
>
> PS.
> typo in http://projects.unbit.it/uwsgi/wiki/Doc :
> "...uwsgi packet up to 32k, bugger packet..."
> probably should be "bigger"
>
> --
>

Both fixed

--

-- 
Roberto De Ioris
http://unbit.it
Łukasz Wróblewski | 1 Jun 08:13 2011
Picon

Re: uwsgi.log

----- Oryginalna wiadomość -----
> Od: "Roberto De Ioris" <roberto <at> unbit.it>
> Do: "uWSGI developers and users list" <uwsgi <at> lists.unbit.it>
> Wysłane: środa, 1 czerwiec 2011 6:53:57
> Temat: Re: [uWSGI] uwsgi.log
> 
> uwsgi.log call uwsgi_log() c function.
> 
> It allocates 4k for log management, so 8178 bytes will not get into.
> 
> 
> 
> You can use "print" (for now) but i suppose i can make it more smart
> and
> allocates memory on demand for bigger loglines.
> 

My point is that after message exceeds the buffer size:
- was called an exception
or
- message was divided into several log entries
or
- if possible remove buffer restriction 

And not as it is today - a few kb insert illegible information. Theoretically, it damages the log file.

--

-- 
Łukasz Wróblewski
http://www.nri.pl/ - Nowoczesne Rozwiązania Internetowe
http://www.hostowisko.pl/ - Profesjonalny i tani hosting
(Continue reading)

Roberto De Ioris | 1 Jun 08:39 2011
Picon

Re: uwsgi.log


Il giorno 01/giu/2011, alle ore 08.13, Łukasz Wróblewski ha scritto:

> ----- Oryginalna wiadomość -----
>> Od: "Roberto De Ioris" <roberto <at> unbit.it>
>> Do: "uWSGI developers and users list" <uwsgi <at> lists.unbit.it>
>> Wysłane: środa, 1 czerwiec 2011 6:53:57
>> Temat: Re: [uWSGI] uwsgi.log
>> 
>> uwsgi.log call uwsgi_log() c function.
>> 
>> It allocates 4k for log management, so 8178 bytes will not get into.
>> 
>> 
>> 
>> You can use "print" (for now) but i suppose i can make it more smart
>> and
>> allocates memory on demand for bigger loglines.
>> 
> 
> My point is that after message exceeds the buffer size:
> - was called an exception
> or
> - message was divided into several log entries
> or
> - if possible remove buffer restriction 
> 
> And not as it is today - a few kb insert illegible information. Theoretically, it damages the log file.
> 

(Continue reading)

Łukasz Wróblewski | 1 Jun 09:01 2011
Picon

Re: uwsgi.log


----- Oryginalna wiadomość -----
> Od: "Roberto De Ioris" <roberto <at> unbit.it>
> Do: "uWSGI developers and users list" <uwsgi <at> lists.unbit.it>
> Wysłane: środa, 1 czerwiec 2011 8:39:26
> Temat: Re: [uWSGI] uwsgi.log
> 
> Can you retry with the latest tip ?
> 
> If memory is not enough it will allocate a tmp buffer
> 

Definitely something is wrong:

2011-01-06 08:57:26 - 2011-01-06 08:57:26 - Wed Jun  1 08:57:26 2011 - master sent signal 1 to worker 1
Wed Jun  1 08:57:26 2011 - master sent signal 1 to worker 1
2011-01-06 08:57:26 - 2011-01-06 08:57:26 - 2011-01-06 08:57:26 - 2011-01-06 08:57:26 - 2011-01-06
08:57:26 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 -
2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06
08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 -
2011-01-06 08:57:27 - 2011-01-06 08:57:27 - single process ***
2011-01-06 08:57:27 - 2011-01-06 08:57:27 - abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcd...
eabcde[null]2011-01-06 08:57:28 - 2011-01-06 08:57:29 - 2011-01-06 08:57:30 - 2011-01-06 08:57:30 -
2011-01-06 08:57:30 - 2011-01-06 08:57:30 -  (default app)
2011-01-06 08:57:30 - 2011-01-06 08:57:30 - 2011-01-06 08:57:30 - 2011-01-06 08:57:30 - 2011-01-06
08:57:30 - 2011-01-06 08:57:30 - 2011-01-06 08:57:30 - 
2011-01-06 09:00:35 - 2011-01-06 09:00:35 - Wed Jun  1 09:00:35 2011 - master sent signal 1 to worker 1
2011-01-06 09:00:35 - 2011-01-06 09:00:35 - 2011-01-06 09:00:35 - 2011-01-06 09:00:36 - 2011-01-06
09:00:36 - 2011-01-06 09:00:36 - 2011-01-06 09:00:36 - 2011-01-06 09:00:36 - 2011-01-06 09:00:36 -
2011-01-06 09:00:36 - 2011-01-06 09:00:36 - 2011-01-06 09:00:36 - 2011-01-06 09:00:36 - 2011-01-06
(Continue reading)

Roberto De Ioris | 1 Jun 09:17 2011
Picon

Re: uwsgi.log


Il giorno 01/giu/2011, alle ore 09.01, Łukasz Wróblewski ha scritto:

> 
> 
> ----- Oryginalna wiadomość -----
>> Od: "Roberto De Ioris" <roberto <at> unbit.it>
>> Do: "uWSGI developers and users list" <uwsgi <at> lists.unbit.it>
>> Wysłane: środa, 1 czerwiec 2011 8:39:26
>> Temat: Re: [uWSGI] uwsgi.log
>> 
>> Can you retry with the latest tip ?
>> 
>> If memory is not enough it will allocate a tmp buffer
>> 
> 
> Definitely something is wrong:
> 
> 2011-01-06 08:57:26 - 2011-01-06 08:57:26 - Wed Jun  1 08:57:26 2011 - master sent signal 1 to worker 1
> Wed Jun  1 08:57:26 2011 - master sent signal 1 to worker 1
> 2011-01-06 08:57:26 - 2011-01-06 08:57:26 - 2011-01-06 08:57:26 - 2011-01-06 08:57:26 - 2011-01-06
08:57:26 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 -
2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06
08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - 2011-01-06 08:57:27 -
2011-01-06 08:57:27 - 2011-01-06 08:57:27 - single process ***
> 2011-01-06 08:57:27 - 2011-01-06 08:57:27 - abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcd...
> eabcde[null]2011-01-06 08:57:28 - 2011-01-06 08:57:29 - 2011-01-06 08:57:30 - 2011-01-06 08:57:30 -
2011-01-06 08:57:30 - 2011-01-06 08:57:30 -  (default app)
> 2011-01-06 08:57:30 - 2011-01-06 08:57:30 - 2011-01-06 08:57:30 - 2011-01-06 08:57:30 - 2011-01-06
08:57:30 - 2011-01-06 08:57:30 - 2011-01-06 08:57:30 - 
(Continue reading)

Łukasz Wróblewski | 1 Jun 09:26 2011
Picon

Re: uwsgi.log

----- Oryginalna wiadomość -----
> Od: "Roberto De Ioris" <roberto <at> unbit.it>
> Do: "uWSGI developers and users list" <uwsgi <at> lists.unbit.it>
> Wysłane: środa, 1 czerwiec 2011 9:17:10
> Temat: Re: [uWSGI] uwsgi.log
> 
> oops wrong commit.
> 
> Please retry, thanks
> 

Is much better.
The only thing missing \n at the end of a long line instead is [null].
So next entry does not begin on a new line:

...deabcdeabcdeend2011-01-06 09:20:59 - WSGI application 0 (SCRIPT_NAME=) ...

Apart from this detail. It works perfectly.

--

-- 
Łukasz Wróblewski
http://www.nri.pl/ - Nowoczesne Rozwiązania Internetowe
http://www.hostowisko.pl/ - Profesjonalny i tani hosting
http://www.katalog-polskich-firm.pl/ - Najlepszy darmowy katalog firm
_______________________________________________
uWSGI mailing list
uWSGI <at> lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
Łukasz Wróblewski | 1 Jun 09:37 2011
Picon

Re: spooler buffer

----- Oryginalna wiadomość -----
> Od: "Roberto De Ioris" <roberto <at> unbit.it>
> Do: "uWSGI developers and users list" <uwsgi <at> lists.unbit.it>
> Wysłane: środa, 1 czerwiec 2011 7:14:06
> Temat: Re: [uWSGI] spooler buffer
> 
> Both fixed
> 

"ValueError: spooler packet cannot be more than 4096 bytes"
Works allright, but whether or not you can at least get rid of while writing this restriction?
If not, how does increasing the buffer to the memory usage?

Maybe you can solve it like with uwsgi.log just now?

--

-- 
Łukasz Wróblewski
http://www.nri.pl/ - Nowoczesne Rozwiązania Internetowe
http://www.hostowisko.pl/ - Profesjonalny i tani hosting
http://www.katalog-polskich-firm.pl/ - Najlepszy darmowy katalog firm
_______________________________________________
uWSGI mailing list
uWSGI <at> lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
Roberto De Ioris | 1 Jun 09:48 2011
Picon

Re: uwsgi.log


Il giorno 01/giu/2011, alle ore 09.26, Łukasz Wróblewski ha scritto:

> ----- Oryginalna wiadomość -----
>> Od: "Roberto De Ioris" <roberto <at> unbit.it>
>> Do: "uWSGI developers and users list" <uwsgi <at> lists.unbit.it>
>> Wysłane: środa, 1 czerwiec 2011 9:17:10
>> Temat: Re: [uWSGI] uwsgi.log
>> 
>> oops wrong commit.
>> 
>> Please retry, thanks
>> 
> 
> Is much better.
> The only thing missing \n at the end of a long line instead is [null].
> So next entry does not begin on a new line:
> 
> ...deabcdeabcdeend2011-01-06 09:20:59 - WSGI application 0 (SCRIPT_NAME=) ...
> 
> Apart from this detail. It works perfectly.

fixed

> 
> -- 
> Łukasz Wróblewski
> http://www.nri.pl/ - Nowoczesne Rozwiązania Internetowe
> http://www.hostowisko.pl/ - Profesjonalny i tani hosting
> http://www.katalog-polskich-firm.pl/ - Najlepszy darmowy katalog firm
(Continue reading)

Roberto De Ioris | 1 Jun 09:50 2011
Picon

Re: spooler buffer


Il giorno 01/giu/2011, alle ore 09.37, Łukasz Wróblewski ha scritto:

> ----- Oryginalna wiadomość -----
>> Od: "Roberto De Ioris" <roberto <at> unbit.it>
>> Do: "uWSGI developers and users list" <uwsgi <at> lists.unbit.it>
>> Wysłane: środa, 1 czerwiec 2011 7:14:06
>> Temat: Re: [uWSGI] spooler buffer
>> 
>> Both fixed
>> 
> 
> "ValueError: spooler packet cannot be more than 4096 bytes"
> Works allright, but whether or not you can at least get rid of while writing this restriction?
> If not, how does increasing the buffer to the memory usage?

-b on commandline (or buffer-size option) max 64k

> 
> Maybe you can solve it like with uwsgi.log just now?

probably (as spooler do not has the need to be as fast as possibile) we can avoid pre-allocating the buffer
and dinamiccaly create it for each request. Or we can simply forget it and pre-allocate the whole 64k

--
Roberto De Ioris
http://unbit.it

_______________________________________________
uWSGI mailing list
(Continue reading)


Gmane