Skip to content

Need to adjust trace buffer size/limit #551

Description

@malikm

Some users report getting a "The backing-file for the real-time session "..." has reached its maximum size. As a result, new events will not be logged to this session until space becomes available. This error is often caused by starting a trace session in real-time mode without having any real-time consumers."

I suspect this is due to the buffer size limit set (or rather not set) for the real-time trace session.
PM doesn't set BufferSize, MinimumBuffers or MaximumBuffers when starting a session, so Windows sets this automatically. In this case, Windows sets the following:

  • Buffer size: 64 KB
  • Minimum buffers: 256
  • Maximum buffers: 278

I think we need to increase the sessionProps.MaximumBuffers value prior to StartTraceW call, or do a ControlTraceW( ..., EVENT_TRACE_CONTROL_UPDATE) later.
It might also be good to let the application specify this value via a parameter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions