piwik error while request data in a daterange - matomo

i have a problem for getting reports in piwik from a date range about 30 days on dashboard , visitors and actions tabs. when i want to do this this error occures :
Oops… there was a problem during the request. Maybe the server had a temporary issue, or maybe you requested a report with too much data. Please try again. If this error occurs repeatedly please contact your Piwik administrator for assistance.
i did archiving with below command :
/usr/bin/php /var/www/html/piwik/console core:archive --url=http://myip/piwik/
and it resolved issue just on dashboard , and it still show that error when i want to get reports for a date range about 30 days on visitors and actions tabs.
when i set the date range to smaller ranges for example about 15 days it is ok and does not shows any error.
i have installed piwik on RHEL with php 5.3.3 and mysql 5.1 .
can anyone help me how to fix this problem.
thanks

I have fixed this issue. It is related with data format. After changing the date format, i could able to load my page with out issue. I have added the error.log for the reference.
Hope this will help to someone who is seeking help.
You can change the particular table column "date format" by using the below query:
UPDATE table_name
SET field_name = replace(same_field_name, 'unwanted_text', 'wanted_text')
[Sat Sep 12 12:03:37.124105 2015] [:error] [pid 21414] [client 192.168.1.22:50006] Error in Piwik: Date format must be: YYYY-MM-DD, or 'today' or 'yesterday' or any keyword supported by the strtotime function (see http://php.net/strtotime for more information): -62169984000, referer: http://192.168.1.20/AP_Enterprise/index.php?module=MultiSites&action=index&idSite=1&period=day&date=yesterday

i increased memory_limit from 128M to 512M and max_execution_time from 30 to 120 in my php.ini and the issue resolved.
this may be useful for someone with same problem.
thanks

This error usually means, that there was a timeout. Try to adjust your configs. The reason for timeouts is the fact, that date range reports are not pre-archived.
On the other hand, it's recommended to use PHP 5.4+ and MySQL 5.5+ if the performance is important for you.

Related

Datastudio: Blended Data: Date aggregation not working

I have a blended data source, that connects two filtered Google Analytics metrics. In there I have a calculated chart field, that gives me the ratio between these two filtered metrics. Now I'm trying to change the date aggregation to year-month, but there seems to be a problem.
This is with date auto, which is perfect:
However this is what happens with Year Month aggregation:
There should be only a line per month left, but somehow the aggregation is not working.
Do you have any idea on how to fix this? I've setup my blended data source at least 10 times trying to use the date on one source or as a key, but none worked.
Cheers
Andreas
I didn't find a fix either. Worked around it by making a custom field with the function MONTH(date) and using that. Works like a charm
Your solution did the job perfectly. Thank you, Joppe. I am quoting your workaround as an answer to bring more visibility to it.
Credit: Joppe De Cuyper (comment in the question)
Best solution here :
https://support.google.com/looker-studio/thread/96504295?hl=en
I have found others with a similar issue
https://support.google.com/datastudio/thread/65220021?hl=en
The workaround I guess is to maybe have dedicated column that represents date month in your source data. So 01-01-2021 for all Jan 2021, etc. As long as they are the same it should work I think.
WORKAROUND
You can use the following Formula and add a calculated field to your source table:
DATE(YEAR(your_date_column),MONTH(your_date_column),1)
Last edited Feb 3, 2021

SQL Server Select all except data where next row has datediff of less than 10 milliseconds

I'm using SQL Server 2017 and i'm facing an issue.
I have the following data (sample seen below).
What i want is to select all the cardnumbers, except these that are followed by an event that contains the same cardnumber while the result value is not ok.
Their time difference between these two events is at most 200 milliseconds (so i believe in the where clause it must be datediff(ms, cardnumberofpreviousevent, cardnumberofnextevent) > 200.
So in this case, the desirable outcome should be all the lines displayed above (line 426 to 433), except the checked line 432.
Can anyone give me some help? It will be much appreciated. Thank you.
Your answer is in your question.
Did you try :
where datediff(ms, cardnumberofpreviousevent, cardnumberofnextevent) > 200
If it does not work, please include your whole query, then I will advise how to alter it...

How can I get more than one Stackdriver notifications from a given metric?

I defined alerts based on a log metric. (For testing, I made sure that this is a metric that occurs every minute.)
I get an email, as follows -- but only one. How can I have further emails sent when the metric is triggered again? Note that after I got that one email, I logged in and "Acknowledged" the incident but no more emails come.
From: Stackdriver Alerts <alerts#stackdriver.com>
Date: Tue, Feb 21, 2017 at 5:35 PM
Subject: [ALERT] Suggested Condition on myapp default:20161017t181616
To: a..#...s.com
Stackdriver has detected that one of your resources has entered an alert state.
Summary: logging/user/FilterMetricIContainerOnUrlAndRequestStatus for myapp default:20161017t181616 with metric labels {log=appengine.googleapis.com/request_log} is below the threshold of 100 with a value of 0.016666666666666666.
Violation Began: 2017-02-21 15:28:48 UTC (6 mins 59 secs)
Condition Name: Suggested Condition
View violation details: https://app.google.stackdriver.com/account/login/cloud-eng-dev/incidents/0.k99rt8xwbh5i
you should be receiving a notification for every incident that's open. I suggest if this isn't the case and you've verified that the conditions are met again (so the metric is in violation again), that you click on the bottom right "Send Feedback" button, and include my name so I catch it. That will help provide more info into your situation.
Thanks for using Stackdriver!
My guess is that you're getting one incident that doesn't close, which suggests that your alerting policy is defined too loosely. Is your alerting duration shorter than the interval between log messages? I'd suggest making it no more than half the interval.
Aaron Sher, Stackdriver engineer

Solr last_index_time difference timezone format so output is wrong

Few days back I have started working on solr, and today I am facing a problem with deltaQuery.
my server timezone is IST also mysql is giving default output in IST.
but solr dataimport.properties file storing the timezone in UTC.
Problem is when I selecting the query B.modified_on >'${dataimporter.last_index_time}' then wrong time comparing because of timezone.
the solr logs are:- B.modified_on>'2016-09-23 07:39:10' and the server time is.
$ date
Fri Sep 23 15:22:20 IST 2016
Please suggest how to change solr timezone in IST or any other answer. I cann't my linux server timezone.
Solr logs by default are in UTC. To change this to IST, edit the solr.in.sh file to include the line:
# By default the start script uses UTC; override the timezone if needed
SOLR_TIMEZONE="IST"
You can use the CONVERT_TZ function in MySQL to convert a datetime field to UTC.
CONVERT_TZ(B.modified_on, 'IST', 'UTC') > '${dataimporter.last_index_time}'
.. should work. Try it in a MySQL command line session to see that you're getting the correct UTC time back.

Is it possible to specify time zone for DB data source in PHPStorm?

I have UTC time zone set in my PostgreSQL and SELECT NOW() shows me the right date in psql console.
I use PHPStorm for development and its database console for accessing my database, but it uses different time zone (Europe/Moscow, which is the time zone of my Mac), and SELECT NOW() shows me the time in this time zone (and by the way, the date is wrong, because the Europe/Moscow time zone recently changed its offset to +3 from +4).
I have not found any information on how to tell PHPStorm to use the time zone configured in postgresql.conf instead of system's time zone. Is it possible?
verify your timezone with query
SELECT * FROM pg_timezone_names
now add phpstorm.vmoptions the config off timezone
-Duser.timezone=posix/America/Sao_Paulo
Apply changes, disconect, synchronize and verify whithselect now()
Well, I've found a solution, but it will affect every time-specific behavior in IDE, e.g. console logs will show datetime in UTC.
The idea is to pass a timezone to VM options. For that we need to modify a file and restart IDE.
For Mac OS X for the latest version of PHPStorm:
cp /Applications/PhpStorm.app/Contents/bin/phpstorm.vmoptions ~/Library/Preferences/PhpStorm2016.1/
Then add -Duser.timezone=UTC to the file, so that it looks something like that:
-Xms128m
-Xmx750m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Duser.timezone=UTC
After phpstorm.vmoptions file modification with -Duser.timezone=UTC line I've seen correct return only from NOW() function but incorrect from the queries to a table like SELECT timestamp FROM ...
Only adding a variable timezoneAsRegion with false value to Advanced tab of connection without any phpstorm.vmoptions changes helped me to return correct timezone from the table.
Documentation link: https://www.jetbrains.com/help/phpstorm/2016.1/data-sources-and-drivers-dialog.html#advancedTab

Resources