[prev in list] [next in list] [prev in thread] [next in thread] 

List:       privoxy-users
Subject:    [privoxy-users] [ ijbswa-Support Requests-3605454 ] Recompile so log lines won't be truncated
From:       SourceForge.net <noreply () sourceforge ! net>
Date:       2013-02-23 12:45:33
Message-ID: E1U9ETw-0001By-6P () sfs-ml-4 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Support Requests item #3605454, was opened at 2013-02-20 10:29
Message generated for change (Comment added) made by fabiankeil
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=211118&aid=3605454&group_id=11118

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: other
Group: 3.0.19
> Status: Closed
Priority: 5
Private: No
Submitted By: Teresa e Junior (teresaejunior)
Assigned to: Fabian Keil (fabiankeil)
Summary: Recompile so log lines won't be truncated

Initial Comment:
Hello, I'm trying to recompile Privoxy 3.0.19 on Debian to get rid of the log line \
size limit, and the only number I have found in the source is on pcrs.h: #define \
PCRS_BUFFER_SIZE 4000

I don't really know if this is the number to be changed, because I don't understand \
C, but I tried increasing it, and compilation fails with: "warning: integer constant \
is too large for its type"

Please, what could I do to get the entire lines on the log with debug 16? I know it \
looks a bit insane, but I really need it.

----------------------------------------------------------------------

> Comment By: Fabian Keil (fabiankeil)
Date: 2013-02-23 04:45

Message:
You're welcome.

The number refers to the size of the buffer and the log message gets
truncated if it otherwise wouldn't fit.

The whole buffer space is "used" even if all the log messages are a lot
smaller.

100 MB still seem excessive to me and could cause problems under load, but
of course you can always further decrease it later on.

----------------------------------------------------------------------

Comment By: Teresa e Junior (teresaejunior)
Date: 2013-02-22 05:07

Message:
Thanks again! I thought that number referred to the maximum number of
characters before truncating, that's why I abused it! I set it to 100MB and
everything seems to be OK so far!

----------------------------------------------------------------------

Comment By: Fabian Keil (fabiankeil)
Date: 2013-02-22 03:38

Message:
999999999 bytes are nearly 1 GB which seems excessive to me.

Probably you tried to access Privoxy while it was still busy consuming the
memory.

I suggest you use a more reasonable limit, for example a few MB.

You might want to double check that the logfile directive is used (by
default it isn't):
http://www.privoxy.org/user-manual/config.html#LOGFILE

----------------------------------------------------------------------

Comment By: Teresa e Junior (teresaejunior)
Date: 2013-02-21 12:12

Message:
Hi, Fabian! Thanks for your reply!

I could change those two lines to no more than 999999999, and had to
unlimit the stack size to get Privoxy to start, otherwise it would
segfault, but I can't get to connect to any website. Firefox says: "The
proxy server is refusing connections", and I set debug 16, 1024, and 8192,
but the log is always empty.

Thanks for your attention!

----------------------------------------------------------------------

Comment By: Fabian Keil (fabiankeil)
Date: 2013-02-21 05:58

Message:
Privoxy is not designed for this and thus there is not single #define to
change.
I've been using a local patch to address this for a while now, though, and
intent to commit it after the next stable release.

The log truncation currently depends on BUFFER_SIZE but you can't simply
increase BUFFER_SIZE as it has other side effects you probably don't want.

What you can do is modify errlog.c to use something else instead. The lines
to change are:
char tempbuf[BUFFER_SIZE];
and
size_t log_buffer_size = BUFFER_SIZE;
at the beginning of log_error().

Note that it's a static buffer and the memory is "used" even when it isn't
"needed". Depending on your system configuration you may have to increase
the "stack size" limit for the Privoxy user.

Also note that the worst case scenario is (probably) Privoxy trying to log
the whole filtered response at the same time. 

Logging a single unprinted byte requires four bytes due to escaping and a
response could completely consist of unprintable characters.

If you care about this you'll have to significantly decrease the buffer
limit (http://config.privoxy.org/user-manual/config.html#BUFFER-LIMIT) or
increase the buffer in log_error() quite a bit.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=211118&aid=3605454&group_id=11118

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Ijbswa-users mailing list
Ijbswa-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ijbswa-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic