[
https://issues.apache.org/jira/browse/LOG4NET-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599066#action_12599066
]
Ron Grabowski commented on LOG4NET-156:
---------------------------------------
This doesn't look like log4net bug so I'm recommending again that you take this
discussion to one of the mailing lists. More people monitor the lists so you
might get a faster response from there.
The MinimalLock is very slow compared to the default ExclusiveLock. Its not
designed for what you're using it for. Do you have multiple instances of your
program trying to write to the same file? With 250 users it sounds like the
AdoNetAppender would be a better choice. log4net isn't a database server. Have
you tried using the MutexLock that was posted to the log4net-users list a few
months ago? That allows multiple processes to write to the same file while
still being performant.
I'd recommend against using the RollingFileAppender and the MinimalLock in all
but the most basic scenarios (i.e. for single user / single threaded apps its
fine).
I'm eventually going to mark this ticket as Invalid.
> Probable I/O race condition detected while copying memory.
> -----------------------------------------------------------
>
> Key: LOG4NET-156
> URL: https://issues.apache.org/jira/browse/LOG4NET-156
> Project: Log4net
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 1.2.10
> Environment: Windows XP Professional
> Reporter: siva
> Fix For: 1.2.10
>
>
> Currently we are facing some issues with the log4net configuration in our
> project. I am looking for help on this.
> We are getting the following error in the log4net log file:
> Error: Probable I/O race condition detected while copying memory. The I/O
> package is not thread safe by default. In multithreaded applications, a
> stream must be accessed in a thread-safe way, such as a thread-safe wrapper
> returned by TextReader's or TextWriter's Synchronized methods. This also
> applies to classes like StreamWriter and StreamReader.]
> We are using the rollinglogfileAppender with the rolling style as "Date" and
> the locking model as "log4net.Appender.FileAppender+MinimalLock".
> When nearly 250 users in our application tries to write to the log file it is
> coming with the above error message.
> Any help is greatly appreciated.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.