Skip to content

Can't view stats for a longish time range #4257

Closed

Description

@jonahgreenthal

Past Issues Searched

  • I have searched open and closed issues to make sure that the bug has not yet been reported

Issue is a Bug Report

  • This is a bug report and not a feature request, nor asking for self-hosted support

Using official Plausible Cloud hosting or self-hosting?

Self-hosting

Describe the bug

When I try to view page stats for a time range longer than about six months, the page spins seemingly indefinitely (even overnight) without actually producing data.

This instance is self-hosted on a t2.micro EC2 instance. One possibility is that calculating the aggregation is too resource-intensive, though top shows that there is plenty of available memory (and even more available swap space). If that is the issue, though, there should at least be a reasonable error message, though realistically, I'd be comfortable waiting (just not indefinitely).

I would be happy to do additional work to try to narrow this down, troubleshoot, etc. However, I do not know anything about Plausible internals.

Expected behavior

The report for the indicated time range should load, preferably in a reasonable amount of time.

Screenshots

image

Environment

- OS: Windows 10
- Browser: Firefox
- Browser Version: 127.0

Activity

  1. changed the title [-]Can't view stats for a long time range[/-] [+]Can't view stats for a longisj time range[/+] on Jun 21, 2024
  2. changed the title [-]Can't view stats for a longisj time range[/-] [+]Can't view stats for a longish time range[/+] on Jun 21, 2024
  3. ruslandoga commented on Jun 21, 2024

    @ruslandoga
    Contributor

    👋 @jonahgreenthal

    Thank you for the report!

    According to the browser console the query times out after ten seconds.
    You might get more info (which query, where in the code, etc.) from the server logs:

    $ cd hosting # or wherever you cloned plausible/community-edition
    $ docker compose logs

    There are two possible improvements:

    • make timeout configurable or remove it completely in the community edition
    • show an error in UI and stop the spinning wheel
  4. jonahgreenthal commented on Jun 21, 2024

    @jonahgreenthal
    Author

    Thanks! Here's what I see in the logs:

    plausible_plausible_events_db_1  | 2024.06.21 13:07:38.363143 [ 328 ] {58dfd4a2-fe00-4cec-a90c-90d9d45f3a49} <Error> DynamicQueryHandler: Cannot send exception to client: Code: 24. DB::Exception: Cannot write to ostream at offset 712. (CANNOT_WRITE_TO_OSTREAM), Stack trace (when copying this message, always include the lines below):
    plausible_plausible_events_db_1  | 
    plausible_plausible_events_db_1  | 0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xa3fb75a in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 1. DB::WriteBufferFromOStream::nextImpl() @ 0xa533d12 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 2. DB::WriteBufferFromHTTPServerResponse::nextImpl() @ 0x15cb32ec in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 3. DB::HTTPHandler::trySendExceptionToClient(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, DB::HTTPServerRequest&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&) @ 0x15c2f8bf in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 4. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x15c30e84 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 5. DB::HTTPServerConnection::run() @ 0x15cabda2 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 6. Poco::Net::TCPServerConnection::start() @ 0x18a16b73 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 7. Poco::Net::TCPServerDispatcher::run() @ 0x18a17ecd in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 8. Poco::PooledThread::run() @ 0x18bda829 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 9. Poco::ThreadImpl::runnableEntry(void*) @ 0x18bd80e2 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 10. ? @ 0x73541dca5609 in ?
    plausible_plausible_events_db_1  | 11. __clone @ 0x73541dbca133 in ?
    plausible_plausible_events_db_1  |  (version 22.8.13.20 (official build))
    plausible_plausible_events_db_1  | 2024.06.21 13:07:38.366146 [ 328 ] {} <Error> ServerErrorHandler: Poco::Exception. Code: 1000, e.code() = 32, I/O error: Broken pipe, Stack trace (when copying this message, always include the lines below):
    plausible_plausible_events_db_1  | 
    plausible_plausible_events_db_1  | 0. Poco::Net::SocketImpl::error(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x18a0f921 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 1. Poco::Net::SocketImpl::sendBytes(void const*, int, int) @ 0x18a11306 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 2. Poco::Net::StreamSocketImpl::sendBytes(void const*, int, int) @ 0x18a15a77 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 3. Poco::Net::HTTPSession::write(char const*, long) @ 0x189ef053 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 4. Poco::Net::HTTPChunkedStreamBuf::writeToDevice(char const*, long) @ 0x189d9715 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 5. Poco::BasicBufferedStreamBuf<char, std::__1::char_traits<char>, Poco::Net::HTTPBufferAllocator>::sync() @ 0x189da829 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 6. ? @ 0x189d992b in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 7. Poco::Net::HTTPChunkedOutputStream::~HTTPChunkedOutputStream() @ 0x189da4e2 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 8. DB::HTTPServerConnection::run() @ 0x15cabf33 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 9. Poco::Net::TCPServerConnection::start() @ 0x18a16b73 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 10. Poco::Net::TCPServerDispatcher::run() @ 0x18a17ecd in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 11. Poco::PooledThread::run() @ 0x18bda829 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 12. Poco::ThreadImpl::runnableEntry(void*) @ 0x18bd80e2 in /usr/bin/clickhouse
    plausible_plausible_events_db_1  | 13. ? @ 0x73541dca5609 in ?
    plausible_plausible_events_db_1  | 14. __clone @ 0x73541dbca133 in ?
    plausible_plausible_events_db_1  |  (version 22.8.13.20 (official build))
    

    Of the options you say, I'd definitely prefer one that lets me see the info rather than an error :-)

  5. added
    self-hosting
    on Jun 22, 2024
  6. self-assigned this
    on Jun 22, 2024
  7. ruslandoga commented on Sep 25, 2024

    @ruslandoga
    Contributor

    👋 @jonahgreenthal

    A way to increase task timeout value #4494 has been released in v2.1.2: #4618

    To increase the timeout value, you would need to add it in the query string to CLICKHOUSE_DATABASE_URL like in #3311 (comment)

  8. jonahgreenthal commented on Sep 27, 2024

    @jonahgreenthal
    Author

    Thank you! I think it's working, but I'm not totally sure because I no longer remember exactly what operation I was trying to do befor :-/

  9. ruslandoga commented on Sep 27, 2024

    @ruslandoga
    Contributor

    I'm going to close it then since another user reported that the task timeout workaround is working in #4360 (reply in thread) :)

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

Metadata

Metadata

Assignees

Labels

self-hosting

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions