TimonKK / clickhouse

NodeJS client for ClickHouse
Apache License 2.0
221 stars 87 forks source link

Bad Request 400, big select query #133

Closed Dennis-Nedry-From-Jurassic-Park closed 2 years ago

Dennis-Nedry-From-Jurassic-Park commented 2 years ago

Добрый день. Не понимаю как использовать библиотеку на длинных запросах,

пример лога

url: 'http://default@localhost:8123/?session_timeout=0&output_format_json_quote_64bit_integers=0&enable_http_compression=0&session_id=0d18255c-127f-47c5-8e58-7bbf2ac6af18&database=default&log_queries=0&max_query_size=1000000000 &max_parser_depth=1000000000&max_bytes_to_read=1000000000&max_rows_to_read=1000000000&query_id=11033efd-be39-42d1-af1a-378f77969072&query=SELECT+ticker%2C+figi%2C+time%2C+low%2C+high%2C+close%2C+volume+FROM+GetCandles+WHERE+1%3D1 +AND+tf%3D5+AND+ticker+IN+%28%27IDCC%27%2C%27RH%27%2C%27SGEN%27%2C%27WGO%27%2C%27TWST%27%2C%27FOUR%27%2C%27UNVR%27%2C%27UI%27%2C%27SHLS%27%2C%27TMX%27%2C%27DDD%27%2C%27KMT%27%2C%27BBSI%27%2C%27MGPI%27%2C%27TCRR%27%2C%27WTTR%27%2C %27ZNH%27%2C%27ALGT%27%2C%27IR%27%2C%27WHR%27%2C%27WMS%27%2C%27WH%27%2C%27AGIO%27%2C%27OMCL%27%2C%27WIRE%27%2C%27STX%27%2C%27ALTR%27%2C%27DFS%27%2C%27THG%27%2C%27FICO%27%2C%27TRV%27%2C%27COO%27%2C%27PLUS%27%2C%27FANG%27%2C%27CME% 27%2C%27CHRW%27%2C%27TRGP%27%2C%27IRBT%27%2C%27BLUE%27%2C%27ALRM%27%2C%27SAH%27%2C%27MAS%27%2C%27KDP%27%2C%27WABC%27%2C%27BRC%27%2C%27COIN%27%2C%27WAL%27%2C%27WTFC%27%2C%27COUR%27%2C%27LAD%27%2C%27MUSA%27%2C%27BRK.B%27%2C%27PAYC% 27%2C%27DY%27%2C%27EVBG%27%2C%27APLS%27%2C%27ANSS%27%2C%27JBSS%27%2C%27QNCX%27%2C%27VNDA%27%2C%27MELI%27%2C%27CHNG%27%2C%27GATX%27%2C%27JBHT%27%2C%27ASTR%27%2C%27INTU%27%2C%27AFG%27%2C%27PRTS%27%2C%27APTV%27%2C%27DNMR%27%2C%27FOC S%27%2C%27MLAB%27%2C%27HSC%27%2C%27JOUT%27%2C%27ROCK%27%2C%27ENTA%27%2C%27GDOT%27%2C%27VRNT%27%2C%27ICPT%27%2C%27IEX%27%2C%27DUOL%27%2C%27INSP%27%2C%27HE%27%2C%27MSTR%27%2C%27USM%27%2C%27DLB%27%2C%27NU%27%2C%27WDFC%27%2C%27BXP%27 %2C%27CSGP%27%2C%27NEWR%27%2C%27GSHD%27%2C%27BLMN%27%2C%27IVZ%27%2C%27PNFP%27%2C%27NYT%27%2C%27CVET%27%2C%27BLNK%27%2C%27PBH%27%2C%27TNET%27%2C%27BRX%27%2C%27BURL%27%2C%27LNT%27%2C%27SSD%27%2C%27CHE%27%2C%27DECK%27%2C%27NTRS%27%2 C%27ASH%27%2C%27DPZ%27%2C%27MPWR%27%2C%27KTB%27%2C%27CABO%27%2C%27BJ%27%2C%27SKX%27%2C%27MORN%27%2C%27ZUO%27%2C%27SON%27%2C%27MYGN%27%2C%27FCN%27%2C%27GEF%27%2C%27BXMT%27%2C%27TTMI%27%2C%27WMG%27%2C%27MCRI%27%2C%27GLBE%27%2C%27SY F%27%2C%27FFIN%27%2C%27EAT%27%2C%27TEL%27%2C%27COOP%27%2C%27NDSN%27%2C%27CSII%27%2C%27SBAC%27%2C%27NLY%27%2C%27PRAX%27%2C%27BAC%27%2C%27EHTH%27%2C%27ANAB%27%2C%27APEI%27%2C%27NWLI%27%2C%27NABL%27%2C%27HUN%27%2C%27GDRX%27%2C%27AYI %27%2C%27JACK%27%2C%27BKI%27%2C%27CFG%27%2C%27BKNG%27%2C%27HST%27%2C%27ZEN%27%2C%27PTC%27%2C%27TAL%27%2C%27MDT%27%2C%27TWNK%27%2C%27PFGC%27%2C%27APPF%27%2C%27PZZA%27%2C%27MTH%27%2C%27EMBC%27%2C%27PKG%27%2C%27FDS%27%2C%27EVH%27%2C %27INO%27%2C%27X%27%2C%27PBA%27%2C%27NGVT%27%2C%27CDAY%27%2C%27NVR%27%2C%27ECPG%27%2C%27AVY%27%2C%27CARG%27%2C%27NWE%27%2C%27KRG%27%2C%27VIR%27%2C%27WDAY%27%2C%27ROLL%27%2C%27PLNT%27%2C%27TREE%27%2C%27FOXA%27%2C%27SWX%27%2C%27SST K%27%2C%27DOCN%27%2C%27EXR%27%2C%27OHI%27%2C%27HHR%27%2C%27LYLT%27%2C%27OTIS%27%2C%27UGI%27%2C%27RVLV%27%2C%27SRPT%27%2C%27DM%27%2C%27AVLR%27%2C%27SCI%27%2C%27HUBS%27%2C%27INT%27%2C%27SITM%27%2C%27CLOV%27%2C%27TRMB%27%2C%27ATGE%2 7%2C%27PETQ%27%2C%27GD%27%2C%27WPM%27%2C%27AWK%27%2C%27NTR%27%2C%27AAP%27%2C%27CHRS%27%2C%27NWL%27%2C%27MTCH%27%2C%27MTTR%27%2C%27MNDY%27%2C%27AXSM%27%2C%27BTAI%27%2C%27ASO%27%2C%27FHI%27%2C%27EVR%27%2C%27CHKP%27%2C%27INMD%27%2C% 27LEGH%27%2C%27ABM%27%2C%27UBS%27%2C%27ACH%27%2C%27AIZ%27%2C%27ADUS%27%2C%27PGTI%27%2C%27ZWS%27%2C%27SUPN%27%2C%27CHX%27%2C%27CARR%27%2C%27LNG%27%2C%27PAGS%27%2C%27BMO%27%2C%27MGM%27%2C%27BE%27%2C%27TDS%27%2C%27FIVN%27%2C%27SWTX% 27%2C%27PPG%27%2C%27TGNA%27%2C%27KSS%27%2C%27SMG%27%2C%27MCHP%27%2C%27PEG%27%2C%27HLT%27%2C%27SNBR%27%2C%27GO%27%2C%27ENS%27%2C%27CTSH%27%2C%27BAH%27%2C%27RBLX%27%2C%27TTM%27%2C%27RMD%27%2C%27USPH%27%2C%27NUS%27%2C%27DK%27%2C%27R ACE%27%2C%27FLGT%27%2C%27HXL%27%2C%27GMS%27%2C%27ABR%27%2C%27PRLB%27%2C%27ANIK%27%2C%27QS%27%2C%27BNTX%27%2C%27PAR%27%2C%27PINS%27%2C%27ARWR%27%2C%27BPMC%27%2C%27TRNO%27%2C%27NSSC%27%2C%27LPRO%27%2C%27KEP%27%2C%27JHG%27%2C%27HR%2 7%2C%27WEX%27%2C%27EGHT%27%2C%27CMCO%27%2C%27GNTX%27%2C%27JLL%27%2C%27BROS%27%2C%27BOH%27%2C%27AJRD%27%2C%27TDG%27%2C%27SOFI%27%2C%27PUBM%27%2C%27HOLX%27%2C%27RETA%27%2C%27AXNX%27%2C%27CUBE%27%2C%27AES%27%2C%27FMC%27%2C%27MAN%27% 2C%27NOVA%27%2C%27LH%27%2C%27WAB%27%2C%27GTHX%27%2C%27LPL%27%2C%27SI%27%2C%27IDXX%27%2C%27FCFS%27%2C%27CCOI%27%2C%27WW%27%2C%27CCJ%27%2C%27CARA%27%2C%27QRTEA%27%2C%27WOR%27%2C%27FVRR%27%2C%27FE%27%2C%27SYNH%27%2C%27AVT%27%2C%27PO DD%27%2C%27SCSC%27%2C%27PGR%27%2C%27XYL%27%2C%27RCII%27%2C%27AXON%27%2C%27LSPD%27%2C%27NBIX%27%2C%27JJSF%27%2C%27CHEF%27%2C%27AMCX%27%2C%27SRC%27%2C%27PPC%27%2C%27CCK%27%2C%27KNSL%27%2C%27SITE%27%2C%27AFMD%27%2C%27EGRX%27%2C%27NJ R%27%2C%27MHO%27%2C%27AIR%27%2C%27SMTC%27%2C%27MMS%27%2C%27HCC%27%2C%27HQY%27%2C%27INVH%27%2C%27HCCI%27%2C%27PIPR%27%2C%27XP%27%2C%27MAA%27%2C%27FL%27%2C%27REX%27%2C%27PGNY%27%2C%27ENB%27%2C%27NVTA%27%2C%27DORM%27%2C%27COKE%27%2C %27MD%27%2C%27BL%27%2C%27AME%27%2C%27DEI%27%2C%27MLKN%27%2C%27SBH%27%2C%27FSLY%27%2C%27LHX%27%2C%27IGMS%27%2C%27CDLX%27%2C%27ARMK%27%2C%27CTXS%27%2C%27NWS%27%2C%27ATO%27%2C%27CYRX%27%2C%27WERN%27%2C%27UFPI%27%2C%27CASY%27%2C%27SA M%27%2C%27CSL%27%2C%27FLS%27%2C%27AVNT%27%2C%27ZION%27%2C%27TRHC%27%2C%27MATV%27%2C%27HLF%27%2C%27AOS%27%2C%27SIVB%27%2C%27BWA%27%2C%27AMCR%27%2C%27EA%27%2C%27RGA%27%2C%27RRX%27%2C%27DASH%27%2C%27FUL%27%2C%27DKNG%27%2C%27VRT%27%2 C%27TXRH%27%2C%27CHWY%27%2C%27WTW%27%2C%27POOL%27%2C%27UTL%27%2C%27WBS%27%2C%27MTB%27%2C%27KRC%27%2C%27BGS%27%2C%27INSM%27%2C%27PCRX%27%2C%27ORA%27%2C%27VSAT%27%2C%27SSNC%27%2C%27YY%27%2C%27HUBG%27%2C%27APPN%27%2C%27MSM%27%2C%27D VA%27%2C%27PCAR%27%2C%27PTR%27%2C%27ORLY%27%2C%27ATR%27%2C%27FARO%27%2C%27MOH%27%2C%27IDA%27%2C%27NVAX%27%2C%27ATNI%27%2C%27SFM%27%2C%27O%27%2C%27APAM%27%2C%27RAMP%27%2C%27H%27%2C%27AI%27%2C%27CGEN%27%2C%27GLPI%27%2C%27FSR%27%2C% 27FGEN%27%2C%27PII%27%2C%27U%27%2C%27MANU%27%2C%27VTRS%27%2C%27ENV%27%2C%27IIPR%27%2C%27TPTX%27%2C%27PJT%27%2C%27FR%27%2C%27SNY%27%2C%27BOX%27%2C%27NMIH%27%2C%27EWBC%27%2C%27IONS%27%2C%27ELV%27%2C%27CNQ%27%2C%27GXO%27%2C%27SBCF%2 7%2C%27HA%27%2C%27ZD%27%2C%27STEM%27%2C%27XPEL%27%2C%27INGR%27%2C%27HGV%27%2C%27TYL%27%2C%27AVTR%27%2C%27XEL%27%2C%27KTOS%27%2C%27DXC%27%2C%27LEG%27%2C%27TW%27%2C%27AUPH%27%2C%27REZI%27%2C%27ONTO%27%2C%27SYNA%27%2C%27KKR%27%2C%27 IAA%27%2C%27HEAR%27%2C%27SLGN%27%2C%27FCNCA%27%2C%27PSMT%27%2C%27APH%27%2C%27PBI%27%2C%27EEFT%27%2C%27CNI%27%2C%27GWRE%27%2C%27VEEV%27%2C%27COLD%27%2C%27MMI%27%2C%27BRO%27%2C%27KMPR%27%2C%27VSTO%27%2C%27STZ%27%2C%27MED%27%2C%27AT RC%27%2C%27ALLO%27%2C%27SWN%27%2C%27S%27%2C%27THS%27%2C%27RRR%27%2C%27CSWI%27%2C%27W%27%2C%27MRVL%27%2C%27EME%27%2C%27ONEM%27%2C%27LITE%27%2C%27CEVA%27%2C%27ARNC%27%2C%27BSY%27%2C%27KRYS%27%2C%27CSGS%27%2C%27SJI%27%2C%27HI%27%2C% 27AMG%27%2C%27CORT%27%2C%27ALG%27%2C%27CENTA%27%2C%27GBX%27%2C%27CVLT%27%2C%27AAON%27%2C%27NTLA%27%2C%27HLI%27%2C%27ALSN%27%2C%27ROP%27%2C%27SHOO%27%2C%27AEE%27%2C%27BCO%27%2C%27LANC%27%2C%27SNA%27%2C%27KRTX%27%2C%27SR%27%2C%27CB U%27%2C%27ZY%27%2C%27CRUS%27%2C%27SLQT%27%2C%27FISV%27%2C%27SEIC%27%2C%27GE%27%2C%27MXL%27%2C%27CG%27%2C%27PFSI%27%2C%27AMT%27%2C%27VVX%27%2C%27COTY%27%2C%27APPH%27%2C%27PLXS%27%2C%27FAF%27%2C%27CMC%27%2C%27VXRT%27%2C%27HIBB%27%2 C%27ABC%27%2C%27VOYA%27%2C%27JCI%27%2C%27AMN%27%2C%27ITCI%27%2C%27WSO%27%2C%27HEI%27%2C%27BBBY%27%2C%27SLAB%27%2C%27CNHI%27%2C%27WSM%27%2C%27HPQ%27%2C%27GPRO%27%2C%27ASIX%27%2C%27TM%27%2C%27GTN%27%2C%27MLCO%27%2C%27MKL%27%2C%27AA L%27%2C%27RRGB%27%2C%27QNST%27%2C%27PING%27%2C%27WOLF%27%2C%27PKI%27%2C%27MSEX%27%2C%27UNF%27%2C%27IBKR%27%2C%27ARW%27%2C%27TSCO%27%2C%27GRMN%27%2C%27DLTH%27%2C%27SBRA%27%2C%27LAC%27%2C%27KMX%27%2C%27OC%27%2C%27WWE%27%2C%27IBN%27 %2C%27ARVN%27%2C%27QUOT%27%2C%27GKOS%27%2C%27RKLB%27%2C%27VMI%27%2C%27JBT%27%2C%27APLT%27%2C%27NARI%27%2C%27CRSP%27%2C%27MASI%27%2C%27TRUP%27%2C%27ILMN%27%2C%27GPK%27%2C%27YETI%27%2C%27NFG%27%2C%27VIRT%27%2C%27SLG%27%2C%27BG%27%2 C%27RIVN%27%2C%27MOMO%27%2C%27AZTA%27%2C%27KOD%27%2C%27CHD%27%2C%27ELS%27%2C%27TPG%27%2C%27SYK%27%2C%27SGMO%27%2C%27EMN%27%2C%27LDOS%27%2C%27ABCB%27%2C%27DV%27%2C%27NVS%27%2C%27L%27%2C%27LOGI%27%2C%27IRDM%27%2C%27LGIH%27%2C%27ATE X%27%2C%27WRK%27%2C%27OSIS%27%2C%27MSA%27%2C%27BJRI%27%2C%27SLVM%27%2C%27UHS%27%2C%27TTEK%27%2C%27HSIC%27%2C%27BLD%27%2C%27BRBR%27%2C%27CVM%27%2C%27CCSI%27%2C%27SPGI%27%2C%27HUBB%27%2C%27EDIT%27%2C%27BLDR%27%2C%27LECO%27%2C%27SBG I%27%2C%27GNRC%27%2C%27ACGL%27%2C%27BLKB%27%2C%27PCOR%27%2C%27MVIS%27%2C%27SONY%27%2C%27HHC%27%2C%27DRQ%27%2C%27NSC%27%2C%27GOOG%27%2C%27CTAS%27%2C%27PRU%27%2C%27KLAC%27%2C%27LCII%27%2C%27CM%27%2C%27KLIC%27%2C%27BEN%27%2C%27CACC% 27%2C%27BERY%27%2C%27SPT%27%2C%27JKHY%27%2C%27FWRD%27%2C%27PCTY%27%2C%27AOSL%27%2C%27WAFD%27%2C%27HASI%27%2C%27POST%27%2C%27CAG%27%2C%27GMED%27%2C%27OMC%27%2C%27UCTT%27%2C%27VRTS%27%2C%27OIS%27%2C%27MSGS%27%2C%27R%27%2C%27LKQ%27% 2C%27BILI%27%2C%27IOSP%27%2C%27TER%27%2C%27CPS%27%2C%27SKIN%27%2C%27SAP%27%2C%27TREX%27%2C%27IART%27%2C%27ROG%27%2C%27SONO%27%2C%27AEO%27%2C%27NXST%27%2C%27HCA%27%2C%27TSP%27%2C%27IBTX%27%2C%27UDR%27%2C%27AJG%27%2C%27YUMC%27%2C%2 7RNR%27%2C%27CVCO%27%2C%27ROL%27%2C%27LPLA%27%2C%27CRL%27%2C%27NVRO%27%2C%27WAT%27%2C%27BOOT%27%2C%27MBUU%27%2C%27GTLS%27%2C%27RPD%27%2C%27OSH%27%2C%27VLDR%27%2C%27MSGE%27%2C%27COF%27%2C%27RIOT%27%2C%27ESAB%27%2C%27NDAQ%27%2C%27S EDG%27%2C%27MEI%27%2C%27GEVO%27%2C%27RGEN%27%2C%27SRE%27%2C%27OGE%27%2C%27TFX%27%2C%27WPC%27%2C%27CVGW%27%2C%27NTCT%27%2C%27CIEN%27%2C%27DLR%27%2C%27BHF%27%2C%27SWBI%27%2C%27GBCI%27%2C%27NVST%27%2C%27SIGI%27%2C%27TPX%27%2C%27WWD% 27%2C%27DMTK%27%2C%27NEOG%27%2C%27NUVA%27%2C%27APLE%27%2C%27CHH%27%2C%27FFIV%27%2C%27GPI%27%2C%27EFX%27%2C%27ARE%27%2C%27CC%27%2C%27TASK%27%2C%27QTWO%27%2C%27ADP%27%2C%27ERIE%27%2C%27ZI%27%2C%27SSB%27%2C%27TKR%27%2C%27SBNY%27%2C% 27RS%27%2C%27VUZI%27%2C%27MDC%27%2C%27EQH%27%2C%27DCPH%27%2C%27MFGP%27%2C%27AWH%27%2C%27SHAK%27%2C%27AEP%27%2C%27NKLA%27%2C%27ALK%27%2C%27RY%27%2C%27WST%27%2C%27FTDR%27%2C%27BMBL%27%2C%27SNX%27%2C%27GRPH%27%2C%27ATRI%27%2C%27EXPI %27%2C%27INGN%27%2C%27CMS%27%2C%27VCEL%27%2C%27RIG%27%2C%27ENR%27%2C%27PSN%27%2C%27MANH%27%2C%27ICLR%27%2C%27FULC%27%2C%27MNRO%27%2C%27WTS%27%2C%27ICUI%27%2C%27P'... 6414 more characters } QueryCursor.exec: result SELECT ticker, figi, time, low, high, close, volume FROM GetCandles WHERE 1=1 AND tf=5 AND ticker IN ('IDCC','RH','SGEN','WGO','TWST','FOUR','UNVR','UI','SHLS','TMX','DDD','KMT','BBSI','MGPI','TCRR',' WTTR','ZNH','ALGT','IR','WHR','WMS','WH','AGIO','OMCL','WIRE','STX','ALTR','DFS','THG','FICO','TRV','COO','PLUS','FANG','CME','CHRW','TRGP','IRBT','BLUE','ALRM','SAH','MAS','KDP','WABC','BRC','COIN','WAL','WTFC','COUR','LAD','MUS A','BRK.B','PAYC','DY','EVBG','APLS','ANSS','JBSS','QNCX','VNDA','MELI','CHNG','GATX','JBHT','ASTR','INTU','AFG','PRTS','APTV','DNMR','FOCS','MLAB','HSC','JOUT','ROCK','ENTA','GDOT','VRNT','ICPT','IEX','DUOL','INSP','HE','MSTR',' USM','DLB','NU','WDFC','BXP','CSGP','NEWR','GSHD','BLMN','IVZ','PNFP','NYT','CVET','BLNK','PBH','TNET','BRX','BURL','LNT','SSD','CHE','DECK','NTRS','ASH','DPZ','MPWR','KTB','CABO','BJ','SKX','MORN','ZUO','SON','MYGN','FCN','GEF', 'BXMT','TTMI','WMG','MCRI','GLBE','SYF','FFIN','EAT','TEL','COOP','NDSN','CSII','SBAC','NLY','PRAX','BAC','EHTH','ANAB','APEI','NWLI','NABL','HUN','GDRX','AYI','JACK','BKI','CFG','BKNG','HST','ZEN','PTC','TAL','MDT','TWNK','PFGC' ,'APPF','PZZA','MTH','EMBC','PKG','FDS','EVH','INO','X','PBA','NGVT','CDAY','NVR','ECPG','AVY','CARG','NWE','KRG','VIR','WDAY','ROLL','PLNT','TREE','FOXA','SWX','SSTK','DOCN','EXR','OHI','HHR','LYLT','OTIS','UGI','RVLV','SRPT','D M','AVLR','SCI','HUBS','INT','SITM','CLOV','TRMB','ATGE','PETQ','GD','WPM','AWK','NTR','AAP','CHRS','NWL','MTCH','MTTR','MNDY','AXSM','BTAI','ASO','FHI','EVR','CHKP','INMD','LEGH','ABM','UBS','ACH','AIZ','ADUS','PGTI','ZWS','SUPN ','CHX','CARR','LNG','PAGS','BMO','MGM','BE','TDS','FIVN','SWTX','PPG','TGNA','KSS','SMG','MCHP','PEG','HLT','SNBR','GO','ENS','CTSH','BAH','RBLX','TTM','RMD','USPH','NUS','DK','RACE','FLGT','HXL','GMS','ABR','PRLB','ANIK','QS',' BNTX','PAR','PINS','ARWR','BPMC','TRNO','NSSC','LPRO','KEP','JHG','HR','WEX','EGHT','CMCO','GNTX','JLL','BROS','BOH','AJRD','TDG','SOFI','PUBM','HOLX','RETA','AXNX','CUBE','AES','FMC','MAN','NOVA','LH','WAB','GTHX','LPL','SI','ID XX','FCFS','CCOI','WW','CCJ','CARA','QRTEA','WOR','FVRR','FE','SYNH','AVT','PODD','SCSC','PGR','XYL','RCII','AXON','LSPD','NBIX','JJSF','CHEF','AMCX','SRC','PPC','CCK','KNSL','SITE','AFMD','EGRX','NJR','MHO','AIR','SMTC','MMS','H CC','HQY','INVH','HCCI','PIPR','XP','MAA','FL','REX','PGNY','ENB','NVTA','DORM','COKE','MD','BL','AME','DEI','MLKN','SBH','FSLY','LHX','IGMS','CDLX','ARMK','CTXS','NWS','ATO','CYRX','WERN','UFPI','CASY','SAM','CSL','FLS','AVNT',' ZION','TRHC','MATV','HLF','AOS','SIVB','BWA','AMCR','EA','RGA','RRX','DASH','FUL','DKNG','VRT','TXRH','CHWY','WTW','POOL','UTL','WBS','MTB','KRC','BGS','INSM','PCRX','ORA','VSAT','SSNC','YY','HUBG','APPN','MSM','DVA','PCAR','PTR' ,'ORLY','ATR','FARO','MOH','IDA','NVAX','ATNI','SFM','O','APAM','RAMP','H','AI','CGEN','GLPI','FSR','FGEN','PII','U','MANU','VTRS','ENV','IIPR','TPTX','PJT','FR','SNY','BOX','NMIH','EWBC','IONS','ELV','CNQ','GXO','SBCF','HA','ZD' ,'STEM','XPEL','INGR','HGV','TYL','AVTR','XEL','KTOS','DXC','LEG','TW','AUPH','REZI','ONTO','SYNA','KKR','IAA','HEAR','SLGN','FCNCA','PSMT','APH','PBI','EEFT','CNI','GWRE','VEEV','COLD','MMI','BRO','KMPR','VSTO','STZ','MED','ATRC ','ALLO','SWN','S','THS','RRR','CSWI','W','MRVL','EME','ONEM','LITE','CEVA','ARNC','BSY','KRYS','CSGS','SJI','HI','AMG','CORT','ALG','CENTA','GBX','CVLT','AAON','NTLA','HLI','ALSN','ROP','SHOO','AEE','BCO','LANC','SNA','KRTX','SR ','CBU','ZY','CRUS','SLQT','FISV','SEIC','GE','MXL','CG','PFSI','AMT','VVX','COTY','APPH','PLXS','FAF','CMC','VXRT','HIBB','ABC','VOYA','JCI','AMN','ITCI','WSO','HEI','BBBY','SLAB','CNHI','WSM','HPQ','GPRO','ASIX','TM','GTN','MLC O','MKL','AAL','RRGB','QNST','PING','WOLF','PKI','MSEX','UNF','IBKR','ARW','TSCO','GRMN','DLTH','SBRA','LAC','KMX','OC','WWE','IBN','ARVN','QUOT','GKOS','RKLB','VMI','JBT','APLT','NARI','CRSP','MASI','TRUP','ILMN','GPK','YETI','N FG','VIRT','SLG','BG','RIVN','MOMO','AZTA','KOD','CHD','ELS','TPG','SYK','SGMO','EMN','LDOS','ABCB','DV','NVS','L','LOGI','IRDM','LGIH','ATEX','WRK','OSIS','MSA','BJRI','SLVM','UHS','TTEK','HSIC','BLD','BRBR','CVM','CCSI','SPGI', 'HUBB','EDIT','BLDR','LECO','SBGI','GNRC','ACGL','BLKB','PCOR','MVIS','SONY','HHC','DRQ','NSC','GOOG','CTAS','PRU','KLAC','LCII','CM','KLIC','BEN','CACC','BERY','SPT','JKHY','FWRD','PCTY','AOSL','WAFD','HASI','POST','CAG','GMED', 'OMC','UCTT','VRTS','OIS','MSGS','R','LKQ','BILI','IOSP','TER','CPS','SKIN','SAP','TREX','IART','ROG','SONO','AEO','NXST','HCA','TSP','IBTX','UDR','AJG','YUMC','RNR','CVCO','ROL','LPLA','CRL','NVRO','WAT','BOOT','MBUU','GTLS','RP D','OSH','VLDR','MSGE','COF','RIOT','ESAB','NDAQ','SEDG','MEI','GEVO','RGEN','SRE','OGE','TFX','WPC','CVGW','NTCT','CIEN','DLR','BHF','SWBI','GBCI','NVST','SIGI','TPX','WWD','DMTK','NEOG','NUVA','APLE','CHH','FFIV','GPI','EFX','A RE','CC','TASK','QTWO','ADP','ERIE','ZI','SSB','TKR','SBNY','RS','VUZI','MDC','EQH','DCPH','MFGP','AWH','SHAK','AEP','NKLA','ALK','RY','WST','FTDR','BMBL','SNX','GRPH','ATRI','EXPI','INGN','CMS','VCEL','RIG','ENR','PSN','MANH','I CLR','FULC','MNRO','WTS','ICUI','PRG','KNBE','FLR','TAK','AZO','WKHS','DLO','ANIP','NCNO','FOXF','ACIW','WSC','PAAS','MCO','POR','FROG','AON','ET','UTHR','PB','PTCT','NLSN','IFF','AMP','AVB','WIX','VEON','ARCC','HAS','WING','ESPR ','URBN','GNL','PH','EIX','MTD','GGG','SLDB','KEY','ALLY','BFH','AVAV','SJW','RCUS','ICFI','LSCC','MSCI','EXP','FCEL','LYB','MTX','ALE','SHW','BAX','CLB','BMI','DRI','BSX','SILK','IAC','RARE','ABG','VMC','SXT','PLUG','PDCO','APO' ,'KALU','BRKR','SAIA','STE','BDX','RJF','ACI','TCX','AAN','LFST','MMSI','NTGR','PAG','TCBI','FRME','COWN','VNT','QRVO','WTRG','LII','FIZZ','CRMT','LHCG','MOV','SF','UBSI','ZBRA','NKTR','VPG','SQSP','CMI','CMA','LEA','SWAV','VST', 'FRPT','QLYS','CLVT','ATKR','CRNC','VRNS','WCC','LBRDK','LSI','MODV','RYN','BYND','ACM','BECN','RRBI','REYN','NVCR','CP','BF.B','IQV','TRI','CRI','RSG','PRAA','SEE','RE','DOV','CDNA','MMC','JEF','MSI','MP','BIG','VCYT','CGNX','BB IO','PUMP','FTNT','RSKD','HP','CNXC','WWW','CXW','GTX','CBRE','CEA','FIGS','LNTH','IPGP','CENT','DOCS','LOPE','WHD','EBS','RF','ANDE','NTCO','NPK','FELE','CDW','HCSG','STWD','ALLE','BKU','GCP','ZIMV','BNGO','HSKA','HALO','AIN','C NMD','SHI','AIT','CHCO','KR','MKTX','VMEO','HOOD','MLM','THRM','MNST','BAND','NXPI','EXAS','ETR','JELD','ZBH','WISH','ALNY','TCMD','CSX','LASR','TMHC','EPC','GDEV','AMWD','UPWK','NATI','RDY','TOST','TNL','EGP','JNPR','USFD','SWCH ','PRGS','ATI','ATRA','NEU','CWST','SAVA','URI','GL','TDY','PSA','HAE','ZYXI','CBRL','AXGN','PEAK','POSH','DCI','CNXN','MC','UA','GTLB','TOL','DNOW','PAYX','CYTK','DIOD','Y','CRSR','BEAM','NIC','CTVA','DRE','LRN','OSK','YELP','OR I','TNC','ESE','BFAM','ALGN','BLI','STLA','PACB','STNE','EXEL','REGN','AMED','BDC','CEG','LGND','KBH','WLK','BH','CHDN','TTCF','STAA','SCL','ARVL','FLT','TEX','AWR','AX','ALC','VRTV','AAWW','HWM','CRVL','SHEN','AERI','FOX','CBSH' ,'CBT','AYX','PEN','ALIT','LSTR','ALV','BIO','CWT','XNCR','CLR','KWR','ARQT','KOPN','QGEN','SAIC','ELAN','ZYNE','ESGR','RIO','AEIS','AOUT','MARA','ODFL','ELY','MDGL','DNB','PNC','HRTX','DDS','ENTG','CNS','POWI','MATX','SNPS','BTI ','EAF','CARS','CAR','MGRC','HCAT','UNP','KEYS','CACI','AGNC','G','MTRN','VC','IPG','AMTI','DLX','STRA','PLCE','VAC','TPIC','SKLZ','HLNE','MUR','SRI','ETN','BR','EPAM','IT','MHK','LCID','JWN','ULTA','LAZR','OSUR','PNTG','FNKO','M GA','FND','CVNA','KAI','LFUS','ARCH','AMBA','MIDD','CORR','AZPN','CNP','CYBR','CPB','CPT','AIRC','WRLD','SFIX','GHC','OII','DNLI','BILL','ANGI','TDC','ABMD','AVA','NOC','GLOB','APD','OFIX','DT','EXLS','UMBF','THO','EVER','KEX','R GR','AZEK','INSG','CGNT','ADI','VMW','ITGR','BIIB','WK','ESS','DGX','TNDM','SPB@US','ENOV','MEDP','RGNX','GWW','SPSC','PATK','D','SAGE','BOKF','USNA','AORT','MRTX','RYTM','FIS','AWI','FRHC','CERE','CWEN','CINF','DUK','CMP','VREX' ,'HII','SOHU','FTCI','OGS','RNG','XPO','ABCL','BYSI','TXT','COLB','SU','CALM','CLSK','SATS','RXRX','PEGA','HAIN','CPRT','AVNS','ALXO','NTRA','TPH','AGCO','FLWS','UPST','ANF','ATRO','TRU','HURN','CE','GCO','LW','TENB','CELH','SRCL ','LPSN','CMG','KIDS','IPAR','BDTX','STT','AVIR','PRTA','ZUMZ','FNF','IBP','MMM','FRPH','SRDX','PWR','EQIX','RGLD','COFS','VRSN','EAR','DDOG','CW','FORR','NLOK','TSVT','ACLS','AN','ITRI','MKSI','CTLT','ACMR','VICR','MDRX','PATH', 'SKY','AIV','MTN','PRFT','SAVE','ITW','TTC','EXPD','SLP','TT','CHPT','LFC','SMPL','IRM','ZIP','HSY','NCR','QDEL','PINC','I','G','T2') AND toDate(time)='2022-08-18'; null { statusCode: 400, body: '', statusMessage: 'Bad Request', headers: { connection: 'Close' } }

Dennis-Nedry-From-Jurassic-Park commented 2 years ago

в секции config: { max_query_size: 1000000000, max_parser_depth: 1000000000, max_bytes_to_read: 1000000000, max_rows_to_read: 1000000000 } лимиты посмотрел /etc/clickhouse-server/users.xml вроде тоже норм

Dennis-Nedry-From-Jurassic-Park commented 2 years ago

image

Dennis-Nedry-From-Jurassic-Park commented 2 years ago

CREATE TABLE IF NOT EXISTS GetCandles ( ticker LowCardinality(String), figi LowCardinality(String), open Float32 CODEC(Gorilla, ZSTD), high Float32 CODEC(Gorilla, ZSTD), low Float32 CODEC(Gorilla, ZSTD), close Float32 CODEC(Gorilla, ZSTD), volume Int64, time DateTime CODEC(LZ4HC), isComplete Bool CODEC(Gorilla, ZSTD), tf Int8 CODEC(Gorilla, ZSTD) ) ENGINE = ReplacingMergeTree() ORDER BY (ticker, figi, open, high, low, close, volume, time, isComplete, tf);

Dennis-Nedry-From-Jurassic-Park commented 2 years ago

длина строки запроса, который норм отрабатывается 8382 и отдаёт 200, при 8383 уже ломается 400 ответ, sql запрос выше в первом комментарии

на длинном insert'е тоже ломается, но примера нет, надо искать

TimonKK commented 2 years ago

Так а что в логе самого ClickHouse написано? Либа использует POST-запрос, не должно быть тут проблем с размером

Dennis-Nedry-From-Jurassic-Park commented 2 years ago

@TimonKK благодарю за помощь, указал usePost: true в конфиге - заработало, но по-моему ранее работало и без указания этого параметра.

ouyangzhongmin commented 2 years ago

new ClickHouse({ url: ckconfig.host, port: ckconfig.port, isUseGzip: true, usePost: true, raw: false, basicAuth: ckconfig.auth, config: ckconfig.config }
should set usePost:true is avaliable!